mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-13 15:58:06 +02:00
Server Join Post to Announcements, Lenny Command
This commit is contained in:
@@ -0,0 +1,24 @@
|
|||||||
|
const commando = require('discord.js-commando');
|
||||||
|
|
||||||
|
class LennyCommand extends commando.Command {
|
||||||
|
constructor(Client){
|
||||||
|
super(Client, {
|
||||||
|
name: 'lenny',
|
||||||
|
group: 'random',
|
||||||
|
memberName: 'lenny',
|
||||||
|
description: 'Responds with the lenny face. (;lenny)',
|
||||||
|
examples: [';lenny']
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
async run(message, args) {
|
||||||
|
if(message.channel.type !== 'dm') {
|
||||||
|
if(!message.channel.permissionsFor(this.client.user).hasPermission('SEND_MESSAGES')) return;
|
||||||
|
if(!message.channel.permissionsFor(this.client.user).hasPermission('READ_MESSAGES')) return;
|
||||||
|
}
|
||||||
|
console.log("[Command] " + message.content);
|
||||||
|
message.channel.send('( ͡° ͜ʖ ͡°)');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
module.exports = LennyCommand;
|
||||||
@@ -78,7 +78,8 @@ client.on('guildMemberRemove', member => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
client.on('guildCreate', guild => {
|
client.on('guildCreate', guild => {
|
||||||
console.log("[Guild] I have joined the guild: " + guild.name + " (" + guild.id + ")!");
|
console.log("[Guild] I have joined the guild: " + guild.name + ", " + guild.owner.user.username + " (" + guild.id + ")!");
|
||||||
|
client.guilds.get(config.server).channels.get('265503171835592704').send("I have joined the guild: " + guild.name + " (Owner: " + guild.owner.user.username + ")!");
|
||||||
client.shard.fetchClientValues('guilds.size').then(results => {
|
client.shard.fetchClientValues('guilds.size').then(results => {
|
||||||
console.log("[Guild Count] " + results.reduce((prev, val) => prev + val, 0));
|
console.log("[Guild Count] " + results.reduce((prev, val) => prev + val, 0));
|
||||||
const carbonPOST = {
|
const carbonPOST = {
|
||||||
@@ -115,7 +116,8 @@ client.on('guildCreate', guild => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
client.on('guildDelete', guild => {
|
client.on('guildDelete', guild => {
|
||||||
console.log("[Guild] I have left the guild: " + guild.name + " (" + guild.id + ")...");
|
console.log("[Guild] I have left the guild: " + guild.name + ", " + guild.owner.user.username + " (" + guild.id + ")...");
|
||||||
|
client.guilds.get(config.server).channels.get('265503171835592704').send("I have left the guild: " + guild.name + " (Owner: " + guild.owner.user.username + ")...");
|
||||||
client.shard.fetchClientValues('guilds.size').then(results => {
|
client.shard.fetchClientValues('guilds.size').then(results => {
|
||||||
console.log("[Guild Count] " + results.reduce((prev, val) => prev + val, 0));
|
console.log("[Guild Count] " + results.reduce((prev, val) => prev + val, 0));
|
||||||
const carbonPOST = {
|
const carbonPOST = {
|
||||||
|
|||||||
Reference in New Issue
Block a user