Comparing version 0.1.0 to 0.1.1
@@ -1,5 +0,7 @@ | ||
import { GuildMember, Message } from "discord.js"; | ||
import { Client, Guild, GuildMember, Message } from "discord.js"; | ||
import { Command, Join, Leave } from "../../src"; | ||
export class Greeting { | ||
private _talkTopic = 'shit about them' | ||
@Command() | ||
@@ -18,11 +20,15 @@ hello(message: Message): void { | ||
@Join() | ||
async greetNewcomer(guildMember: GuildMember): Promise<void> { | ||
async greetNewcomer(guildMember: GuildMember, client: Client): Promise<void> { | ||
const dm = await guildMember.user.createDM() | ||
dm.send('Oh hey! Welcome to the server!') | ||
dm.send(this._getGreeting(client.guilds.cache.first())) | ||
} | ||
@Leave() | ||
async sayGoodbye(guildMember: GuildMember): Promise<void> { | ||
console.log(`ight this ${guildMember.user.tag} bitch is gone! Let's talk shit about him`) | ||
async sayGoodbye(guildMember: GuildMember, client: Client): Promise<void> { | ||
console.log(`ight this ${guildMember.user.tag} bitch is gone from our ${client.guilds.cache.first()?.name} server! Let's talk ${this._talkTopic}`) | ||
} | ||
private _getGreeting(guild?: Guild): string { | ||
return `Oh hey! Welcome to the ${guild?.name} server!` | ||
} | ||
} |
{ | ||
"name": "honeyglaze", | ||
"version": "0.1.0", | ||
"version": "0.1.1", | ||
"description": "For your honey glazed Discord bots", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
126459
731