Sound's World Code
gist.github.com·231w
Preview
Report Post
import { Client, Message, User } from "discord.js"
import chalk from "chalk"
const client: Client = new Client()
client.on(‘ready’, () => {
console.log(chalk.green(`started bot on ${client.user.tag}`))
})
client.on(‘message’, async function(message: Message) {
if (!message.guild) return
if (message.author.bot) return
if (!message.content.startsWith(‘!’)) return
const args: Array<string> = message.content.slice(`!`.length).trim().split(" ")
const commandName: string = args.shift().toLowerCase()
console.log(chalk.yellow(`command ${commandName} with args [${args}...

Similar Posts

Loading similar posts...