Skip to content

Commit

Permalink
fix: server updated to 2023
Browse files Browse the repository at this point in the history
  • Loading branch information
Ishanjirety-fountane committed Feb 5, 2023
1 parent 31bca0d commit ff548f0
Show file tree
Hide file tree
Showing 8 changed files with 4,664 additions and 66 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@ pod_image.png
individual_image.png
remaining_mails.py
category_image.png
assets/dump
assets/dump
.env.example.1
9 changes: 7 additions & 2 deletions app.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,13 @@ const fs = require('fs');
const Discord = require('discord.js');
const { logger } = require('./utils/logger');
const { token } = JSON.parse(process.env.CONFIG);

const client = new Discord.Client();
const client = new Discord.Client({
intents: [
Discord.Intents.FLAGS.GUILDS,
Discord.Intents.FLAGS.GUILD_MESSAGES,
Discord.Intents.FLAGS.MESSAGE_CONTENT,
],
});
client.login(token);

client.commands = new Discord.Collection();
Expand Down
18 changes: 4 additions & 14 deletions assets/data/doubt_static.json
Original file line number Diff line number Diff line change
@@ -1,24 +1,14 @@
{
"pods": [
{
"id": "918560636970106931",
"id": "1071001398742896697",
"name": "POD 1",
"doubt-channel": "923218465727348737"
"doubt-channel": "1071001398742896693"
},
{
"id": "918560681597476874",
"id": "1071001399497859135",
"name": "POD 2",
"doubt-channel": "923218625014403112"
},
{
"id": "918560726572990544",
"name": "POD 3",
"doubt-channel": "923218652071886858"
},
{
"id": "918560773930876988",
"name": "POD 4",
"doubt-channel": "923218692043595806"
"doubt-channel": "1071001398742896693"
}
]
}
1 change: 0 additions & 1 deletion commands/thank.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ module.exports = {
grattitude_points: 1,
});
const channel = findChannelById(message, client.configs.get(message.guild.id).grattitude_channel_id);

await channel.send(embed);
embed = new Discord.MessageEmbed()
.setColor(COLORS.orange)
Expand Down
28 changes: 14 additions & 14 deletions configs/test.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
module.exports = {
name: 'neoG 22',
id: '914867137863118919',
log_channel_id: '914867138668404767',
unverified_role_id: '915631275249926204',
pa_role_id: '915602982521950218',
ta_role_id: '915603581992853534',
ma_role_id: '915603209110839307',
ca_role_id: '915603586845659168',
member_role_id: '915631152725889055',
grattitude_channel_id: '914875152968335381',
verification_channel_id: '915608637773332529',
welcome_channel_id: '914867137942786104',
moderator_channel_id: '914867138668404767',
leaderboard_channel_id: '917020883275628544',
name: 'neoG 23',
id: '1071001396301795348',
log_channel_id: '1071001398742896690',
unverified_role_id: '1071001396301795349',
pa_role_id: '1071001396406657056',
ta_role_id: '1071001396406657055',
ma_role_id: '1071001396406657054',
ca_role_id: '1071001396381487113',
member_role_id: '1071001396301795350',
grattitude_channel_id: '1071001397153239120',
verification_channel_id: '1071001397153239113',
welcome_channel_id: '1071001396909985880',
moderator_channel_id: '1071001397610434580',
leaderboard_channel_id: '1071001397350375434',
};
2 changes: 1 addition & 1 deletion events/guildMemberAdd.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ module.exports = {
let guildID;
if (PREFIX === '!') guildID = require('../configs/tt-server').id;
else guildID = require('../configs/test').id;

console.log(client.guilds.cache.get(guildID));
const user = client.guilds.cache.get(guildID).members.cache.get(message.author.id);
let command;
let args;
Expand Down
2 changes: 0 additions & 2 deletions events/message.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,10 @@ module.exports = {
}
if (!message.content.startsWith(PREFIX)) await this.checkSpamMessage(message, client);
if (!message.content.startsWith(PREFIX)) return;

let embed;

const args = message.content.slice(PREFIX.length).trim().split(' ');
const command = args.shift().toLowerCase();

let commandFileData;
if (command === 'thanks' || command === 'thankyou' || command === 'ty') commandFileData = client.commands.get('thank');
else commandFileData = client.commands.get(command);
Expand Down
Loading

0 comments on commit ff548f0

Please sign in to comment.