will create a new repository for the slash command.
Done: https://github.com/Syrup/kurapika-update/
Don't forget to do
npm install --save
before running the bot!!!!
rename .env-example
to .env
now open .env
file and fill in each variable according to the instructional
open config.js
file
now replace YOUR DISCORD ID, YOUR DISCORD ID 2
with your discord id and replace YOUR DISCORD ID 2
your friend discord id
and replace prefix
with your discord prefix
Run the bot with bash command npm start
or node index.js
this.client.util.webhook(urlWebhook, message, opt)
Name | Type | Default | Description | Required |
---|---|---|---|---|
urlWebhook | String | none |
Your webhook URL | true |
message | MessageEmbed or String | none |
Can be embed or message | true |
opt | Object | none |
Options | false |
const { MessageEmbed } = require("discord.js");
let url = "Your Webhook URL"
let embed = new MessageEmbed()
.setTitle("Hello")
.setDescription("World")
let opt = {
username: "Happy",
avatar_url: message.author.displayAvatarURL(),
content: "this is optional"
}
this.client.util.webhook(url, embed, opt)
return Object
this.client.util.getMember(message, name)
Name | Type | Default | Description | Required |
---|---|---|---|---|
message | Message | none |
message | true |
name | Snowflake or Username | none |
maybe id or name | true |
(async () => {
let member = await this.client.util.getMember(message, "Syrup")
return member
})()
or
async function user(message, name) {
const member = await this.client.util.getMember(message, name)
return member
}
user(message, "Kurapika")
return GuildMember
this.client.util.getChannel(guild, channel, caseSensitive, wholeWord)
this.client.util.getChannel(message.guild, "general", true)
Name | Type | Default | Description | Required |
---|---|---|---|---|
guild | Guild | none |
Guild to check | true |
channel | Snowflake or Channel Name | none |
maybe the channel id or name | true |
caseSensitive | boolean | false |
Makes checking by name case sensitive. | false |
wholeWord | boolean | false |
Makes finding by name match full word only. | false |
This maybe the same as resolveChannel but I have kept it simple :)
return Channel