Compare commits

..

No commits in common. "7d0a7f68732f5a033d669b449df3689241b63868" and "986d0b7fb49d021887b1abced0bce202154c3266" have entirely different histories.

6 changed files with 15 additions and 29 deletions

View file

@ -46,7 +46,7 @@ class tweetCommand extends Command {
const blacklist = await TwitterBlacklist.findOne({where: {userID:message.author.id}});
if (blacklist) {
return message.channel.send(`You have been blacklisted for the following reasons: \`${blacklist.get('reason')}\` be less naughty next time.`);
return message.channel.send(`You have been blacklisted for the following reasons: \`\`${blacklist.get('reason')}\`\` be less naughty next time.`);
}
// Don't let account new account use this command to prevent spam
if (message.author.createdAt > date.setDate(date.getDate() - 7)) {
@ -157,27 +157,28 @@ class tweetCommand extends Command {
}
const tweetid = response.id_str;
const publicEmbed = client.util.embed()
.setAuthor('Some user of discord said...')
.setDescription(text)
.addField('Link', `https://twitter.com/i/status/${tweetid}`)
.setTimestamp();
if (Attachment[0]) publicEmbed.setImage(Attachment[0].url);
// Im too lazy for now to make an entry in config.json
let channel = client.channels.resolve('597964498921455637');
channel.send(`https://twitter.com/i/status/${tweetid}`);
channel.send({embed: publicEmbed});
const Embed = client.util.embed()
.setAuthor(message.author.username, message.author.displayAvatarURL())
.setDescription(args.text)
.addField('Link', `https://twitter.com/i/status/${tweetid}`, true)
.addField('Tweet ID', tweetid, true)
.addField('Channel ID', message.channel.id, true)
.addField('Messsage ID', message.id, true)
.addField('Author', `${message.author.username} (${message.author.id})`, true)
.setTimestamp();
if (message.guild) {
Embed.addField('Guild', `${message.guild.name} (${message.guild.id})`, true);
Embed.addField('Message link', `https://discord.com/channels/${message.guild.id}/${message.channel.id}/${message.id}`);
} else {
Embed.addField('Message link', `https://discord.com/channels/@me/${message.channel.id}/${message.id}`);
}
if (message.guild) Embed.addField('Guild', `${message.guild.name} (${message.guild.id})`, true);
if (Attachment[0]) Embed.setImage(Attachment[0].url);

View file

@ -32,8 +32,6 @@ class messageListener extends Listener {
});
}
await message.guild.members.fetch();
if (message.author.bot) return;
/* Banned words section

View file

@ -26,8 +26,6 @@ class MessageReactionAddListener extends Listener {
});
}
await reaction.message.guild.members.fetch();
let starboardChannel, shameboardChannel;
let reactionCount = reaction.count;

View file

@ -11,13 +11,6 @@ class messageReactionRemoveListener extends Listener {
}
async exec(reaction) {
if (reaction.partial) {
await reaction.fetch()
.catch(err => {
return console.error(err);
});
}
if (reaction.message.partial) {
await reaction.message.fetch()
.catch(err => {
@ -25,8 +18,6 @@ class messageReactionRemoveListener extends Listener {
});
}
await reaction.message.guild.members.fetch();
let starboardChannel, shameboardChannel;
let reactionCount = reaction.count;

View file

@ -16,7 +16,6 @@ class ReadyListener extends Listener {
}
async exec() {
console.log(this.client.users.cache.size);
let commandSize = this.client.commandHandler.modules.size;
let clientTag = this.client.user.tag;
let guildSize = this.client.guilds.cache.size;
@ -24,7 +23,7 @@ class ReadyListener extends Listener {
let channelSize = this.client.channels.cache.size;
let profilePicture = this.client.user.displayAvatarURL();
let clientID = this.client.user.id;
//let author = this.client.users.resolve(ownerID).tag;
let author = this.client.users.resolve(ownerID).tag;
// Send stats to the console
@ -58,7 +57,7 @@ class ReadyListener extends Listener {
status = status.replace('${prefix}', prefix[0]);
client.user.setActivity(`${status} | My prefix is: ${prefix[0]}`, { type: 'PLAYING' });
} /* else if (random === 2 && owner.presence.activities != null) { // Bot owner status
} else if (random === 2 && owner.presence.activities != null) { // Bot owner status
console.log('Status type: \x1b[32mCopying owner status\x1b[0m');
// Get elapsed time from when the activity started
let diffMins = 0;
@ -70,7 +69,7 @@ class ReadyListener extends Listener {
client.user.setActivity(`${owner.presence.activities[0].name}\nfor ${diffMins} minutes | My prefix is: ${prefix[0]}`, owner.presence.activities[0]);
}
} */
}
}
@ -81,7 +80,6 @@ class ReadyListener extends Listener {
}
// Expose stats
/*
if (exposeStats) {
const port = 3000;
@ -122,7 +120,6 @@ class ReadyListener extends Listener {
});
console.log(`Exposing stats on port ${port}`);
}
*/
console.log('===========[ READY ]===========');

View file

@ -23,7 +23,8 @@ class hahaYesClient extends AkairoClient {
}, {
partials: ['MESSAGE'],
disableMentions: 'everyone',
ws: { intents: intents }
ws: { intents: intents },
fetchAllMembers: true
});
this.commandHandler = new CommandHandler(this, {