Skip to content

Commit f4020a2

Browse files
authored
✨ tweak: code cleanup
1 parent cc37241 commit f4020a2

File tree

3 files changed

+3
-92
lines changed

3 files changed

+3
-92
lines changed

.env.example

+1-4
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
DISCORD_BOT_TOKEN=<discord_bot_token>
22
DISCORD_SUPPORT_ROLE_ID=<role_id>,<role_id>
3-
GOOGLE_PRIVATE_KEY=<private_key>
4-
GOOGLE_SERVICE_ACCOUNT_EMAIL=<service_email_account>
5-
GOOGLE_SPREADSHEET_ID=<google_spreadsheet_id>
63
CONTEXT_ID=<use_context_id>
7-
ASKAI_CHANNEL=<channel_id_for_askai_bot
4+
ASKAI_CHANNEL=<channel_id_for_askai_bot>
85
REDIS_SERVER_URL=<REDIS_SERVER_DETAILS>

src/utils/core.js

+2-15
Original file line numberDiff line numberDiff line change
@@ -68,20 +68,9 @@ const formatTime = (date) => {
6868
}
6969

7070
/**
71-
* get username from ownerid/author.id
72-
* @param {number} id user's id
73-
* @returns
71+
* utility to return server time
72+
* @returns server time
7473
*/
75-
const getUsernameFromId = async (id) => {
76-
return (await client.users.fetch(id)).username;
77-
}
78-
79-
const getURLFromMessage = (message) => {
80-
const regex = /(https?:\/\/[^\s]+)/g;
81-
const url = message.match(regex);
82-
return url;
83-
}
84-
8574
const serverTime = () => {
8675
return moment.utc().utcOffset(config.utc_offset).format('M/DD/YYYY HH:mm:ss');
8776
}
@@ -91,7 +80,5 @@ module.exports = {
9180
CloseButtonComponent,
9281
FeedbackButtonComponent,
9382
formatTime,
94-
getUsernameFromId,
95-
getURLFromMessage,
9683
serverTime
9784
}

src/utils/database.js

-73
This file was deleted.

0 commit comments

Comments
 (0)