Compare commits
4 commits
986d0b7fb4
...
7d0a7f6873
Author | SHA1 | Date | |
---|---|---|---|
7d0a7f6873 | |||
c85fc872ab | |||
16d71a22e6 | |||
59bc18fda6 |
6 changed files with 29 additions and 15 deletions
|
@ -46,7 +46,7 @@ class tweetCommand extends Command {
|
||||||
const blacklist = await TwitterBlacklist.findOne({where: {userID:message.author.id}});
|
const blacklist = await TwitterBlacklist.findOne({where: {userID:message.author.id}});
|
||||||
|
|
||||||
if (blacklist) {
|
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
|
// Don't let account new account use this command to prevent spam
|
||||||
if (message.author.createdAt > date.setDate(date.getDate() - 7)) {
|
if (message.author.createdAt > date.setDate(date.getDate() - 7)) {
|
||||||
|
@ -157,28 +157,27 @@ class tweetCommand extends Command {
|
||||||
}
|
}
|
||||||
|
|
||||||
const tweetid = response.id_str;
|
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
|
// Im too lazy for now to make an entry in config.json
|
||||||
let channel = client.channels.resolve('597964498921455637');
|
let channel = client.channels.resolve('597964498921455637');
|
||||||
channel.send({embed: publicEmbed});
|
channel.send(`https://twitter.com/i/status/${tweetid}`);
|
||||||
|
|
||||||
const Embed = client.util.embed()
|
const Embed = client.util.embed()
|
||||||
.setAuthor(message.author.username, message.author.displayAvatarURL())
|
.setAuthor(message.author.username, message.author.displayAvatarURL())
|
||||||
.setDescription(args.text)
|
.setDescription(args.text)
|
||||||
.addField('Link', `https://twitter.com/i/status/${tweetid}`, true)
|
.addField('Link', `https://twitter.com/i/status/${tweetid}`, true)
|
||||||
.addField('Tweet ID', tweetid, true)
|
.addField('Tweet ID', tweetid, true)
|
||||||
|
.addField('Channel ID', message.channel.id, true)
|
||||||
.addField('Messsage ID', message.id, true)
|
.addField('Messsage ID', message.id, true)
|
||||||
.addField('Author', `${message.author.username} (${message.author.id})`, true)
|
.addField('Author', `${message.author.username} (${message.author.id})`, true)
|
||||||
.setTimestamp();
|
.setTimestamp();
|
||||||
|
|
||||||
if (message.guild) Embed.addField('Guild', `${message.guild.name} (${message.guild.id})`, true);
|
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 (Attachment[0]) Embed.setImage(Attachment[0].url);
|
if (Attachment[0]) Embed.setImage(Attachment[0].url);
|
||||||
|
|
||||||
|
|
|
@ -32,6 +32,8 @@ class messageListener extends Listener {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
await message.guild.members.fetch();
|
||||||
|
|
||||||
if (message.author.bot) return;
|
if (message.author.bot) return;
|
||||||
|
|
||||||
/* Banned words section
|
/* Banned words section
|
||||||
|
|
|
@ -26,6 +26,8 @@ class MessageReactionAddListener extends Listener {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
await reaction.message.guild.members.fetch();
|
||||||
|
|
||||||
let starboardChannel, shameboardChannel;
|
let starboardChannel, shameboardChannel;
|
||||||
let reactionCount = reaction.count;
|
let reactionCount = reaction.count;
|
||||||
|
|
||||||
|
|
|
@ -11,6 +11,13 @@ class messageReactionRemoveListener extends Listener {
|
||||||
}
|
}
|
||||||
|
|
||||||
async exec(reaction) {
|
async exec(reaction) {
|
||||||
|
if (reaction.partial) {
|
||||||
|
await reaction.fetch()
|
||||||
|
.catch(err => {
|
||||||
|
return console.error(err);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
if (reaction.message.partial) {
|
if (reaction.message.partial) {
|
||||||
await reaction.message.fetch()
|
await reaction.message.fetch()
|
||||||
.catch(err => {
|
.catch(err => {
|
||||||
|
@ -18,6 +25,8 @@ class messageReactionRemoveListener extends Listener {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
await reaction.message.guild.members.fetch();
|
||||||
|
|
||||||
let starboardChannel, shameboardChannel;
|
let starboardChannel, shameboardChannel;
|
||||||
let reactionCount = reaction.count;
|
let reactionCount = reaction.count;
|
||||||
|
|
||||||
|
|
|
@ -16,6 +16,7 @@ class ReadyListener extends Listener {
|
||||||
}
|
}
|
||||||
|
|
||||||
async exec() {
|
async exec() {
|
||||||
|
console.log(this.client.users.cache.size);
|
||||||
let commandSize = this.client.commandHandler.modules.size;
|
let commandSize = this.client.commandHandler.modules.size;
|
||||||
let clientTag = this.client.user.tag;
|
let clientTag = this.client.user.tag;
|
||||||
let guildSize = this.client.guilds.cache.size;
|
let guildSize = this.client.guilds.cache.size;
|
||||||
|
@ -23,7 +24,7 @@ class ReadyListener extends Listener {
|
||||||
let channelSize = this.client.channels.cache.size;
|
let channelSize = this.client.channels.cache.size;
|
||||||
let profilePicture = this.client.user.displayAvatarURL();
|
let profilePicture = this.client.user.displayAvatarURL();
|
||||||
let clientID = this.client.user.id;
|
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
|
// Send stats to the console
|
||||||
|
@ -57,7 +58,7 @@ class ReadyListener extends Listener {
|
||||||
status = status.replace('${prefix}', prefix[0]);
|
status = status.replace('${prefix}', prefix[0]);
|
||||||
|
|
||||||
client.user.setActivity(`${status} | My prefix is: ${prefix[0]}`, { type: 'PLAYING' });
|
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');
|
console.log('Status type: \x1b[32mCopying owner status\x1b[0m');
|
||||||
// Get elapsed time from when the activity started
|
// Get elapsed time from when the activity started
|
||||||
let diffMins = 0;
|
let diffMins = 0;
|
||||||
|
@ -69,7 +70,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]);
|
client.user.setActivity(`${owner.presence.activities[0].name}\nfor ${diffMins} minutes | My prefix is: ${prefix[0]}`, owner.presence.activities[0]);
|
||||||
}
|
}
|
||||||
}
|
} */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -80,6 +81,7 @@ class ReadyListener extends Listener {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Expose stats
|
// Expose stats
|
||||||
|
/*
|
||||||
if (exposeStats) {
|
if (exposeStats) {
|
||||||
const port = 3000;
|
const port = 3000;
|
||||||
|
|
||||||
|
@ -120,6 +122,7 @@ class ReadyListener extends Listener {
|
||||||
});
|
});
|
||||||
console.log(`Exposing stats on port ${port}`);
|
console.log(`Exposing stats on port ${port}`);
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
console.log('===========[ READY ]===========');
|
console.log('===========[ READY ]===========');
|
||||||
|
|
||||||
|
|
3
index.js
3
index.js
|
@ -23,8 +23,7 @@ class hahaYesClient extends AkairoClient {
|
||||||
}, {
|
}, {
|
||||||
partials: ['MESSAGE'],
|
partials: ['MESSAGE'],
|
||||||
disableMentions: 'everyone',
|
disableMentions: 'everyone',
|
||||||
ws: { intents: intents },
|
ws: { intents: intents }
|
||||||
fetchAllMembers: true
|
|
||||||
});
|
});
|
||||||
|
|
||||||
this.commandHandler = new CommandHandler(this, {
|
this.commandHandler = new CommandHandler(this, {
|
||||||
|
|
Loading…
Reference in a new issue