Changed Help to an embed, secured Echobox
This commit is contained in:
parent
4c4013612e
commit
a36c40daf6
@ -149,8 +149,44 @@ class Onequestionmark {
|
||||
}
|
||||
// Basic response commands
|
||||
case "help":
|
||||
m.reply({content:'
|
||||
**onequestionmark bot commands**\n`?chk`: ack\n`?slap <target>`: The classic mIRC troutslap.\n`?hug <target (optional)>`: Posts randomized hug image.\n`?yes` and `?no`: Posts randomized yes/no.\n`?angery`\n`?subway`\n`?motd`: Enables MOTD for current channel (requires auth)\n`?devmode`: Toggles Dev Mode (requires auth)\n`?quit`: Shutdown command (requires auth)\n**Non-command bot functions:**\n*MOTD*: Bot will post a randomized *Meme of the Day* in enabled channels.\n*Icce*: Bot provides users with ice cuboids.\n*Meteor*: Bot reacts to falling rocks in the chat.'}, false);
|
||||
/*m.reply({content:'
|
||||
**onequestionmark bot commands**\n`?chk`: ack\n`?slap <target>`: The classic mIRC troutslap.\n`?hug <target (optional)>`: Posts randomized hug image.\n`?yes` and `?no`: Posts randomized yes/no.\n`?angery`\n`?subway`\n`?motd`: Enables MOTD for current channel (requires auth)\n`?devmode`: Toggles Dev Mode (requires auth)\n`?quit`: Shutdown command (requires auth)\n**Non-command bot functions:**\n*MOTD*: Bot will post a randomized *Meme of the Day* in enabled channels.\n*Icce*: Bot provides users with ice cuboids.\n*Meteor*: Bot reacts to falling rocks in the chat.'}, false);*/
|
||||
m.reply({embeds: [
|
||||
{
|
||||
"color": 13733022,
|
||||
"url": "https://discord.com",
|
||||
"author": {
|
||||
"name": "onequestionmark help",
|
||||
"url": "https://discord.com",
|
||||
"icon_url": "https://cdn.discordapp.com/avatars/1071524991084015756/d623b45d33e8119599b29c5cf5ed532e.png"
|
||||
},
|
||||
"thumbnail": {
|
||||
"url": "https://cdn.discordapp.com/emojis/1071560243051511808.png"
|
||||
},
|
||||
"fields": [
|
||||
{
|
||||
"name": "**Bot commands:**",
|
||||
"value": "`?help`: Posts this help document. :book:\n`?chk`: Replies with \"ack\". :speaking_head:\n`?slap <target>`: The classic mIRC troutslap. :fish:\n`?hug <target (optional)>`: Posts randomized hug image. :people_hugging:\n`?yes`: Posts randomized \"yes\" image or video. :thumbsup:\n`?no`: Posts randomized \"no\" image or video. :no_entry_sign:\n`?mrkrabs`: Similar to `?chk`. :crab:\n`?tufac`: The official Tufac Theme Song. :busts_in_silhouette:\n`?coin <count (optional)>`: Flips between 1 and 100 coins. :coin:\n`?dice.<arg> <num>`: Rolls <arg>-sided die <num> times :game_die:\n`?echobox`: Posts randomized quote from the quote database. :loudspeaker:\n`?echobox <quote>`: Adds provided quote to the database. :writing_hand:",
|
||||
"inline": false
|
||||
},
|
||||
{
|
||||
"name": "**Basic Response Aliases:**",
|
||||
"value": "`?angery`: *I taste a vegetal.* :rage:\n`?subway`: Arin's infamous Subway rant. :sandwich:\n`?illuminati`: Always watching. :eye:\n`?cube`: *The Cube*\n`?coolsville`: Population: Us :sunglasses:\n`?communism`: The old 3D rotating gif.\n`?opinions`: Here they come. :scream:",
|
||||
"inline": false
|
||||
},
|
||||
{
|
||||
"name": "**Auth-Requiring Commands:**",
|
||||
"value": "`?motd`: Enables MOTD for current channel\n`?devmode`: Toggles Dev Mode\n`?quit`: Shutdown command",
|
||||
"inline": true
|
||||
},
|
||||
{
|
||||
"name": "**Non-command bot functions:**",
|
||||
"value": "**MOTD**: *Meme of the Day* is posted in enabled channels.\n**Icce**: Bot provides users with ice cuboids. :ice_cube:",
|
||||
"inline": true
|
||||
}
|
||||
]
|
||||
}
|
||||
]});
|
||||
case "chk":
|
||||
m.reply({content:'<@${m.author.id}>: ack'}, false);
|
||||
case "mrkrabs":
|
||||
@ -174,7 +210,6 @@ class Onequestionmark {
|
||||
for (i in 1...(Std.parseInt(msg)+1)) {
|
||||
heads += randInt(0,1);
|
||||
}
|
||||
//'Flipped ${heads} heads, ${Std.parseInt(msg)-heads} tails.'
|
||||
m.reply({content:'${sender} flipped ${Std.parseInt(msg)} coins.\n**Heads:** ${heads}\n**Tails:** ${Std.parseInt(msg)-heads}'}, false);
|
||||
} else {
|
||||
m.reply({content:'Please enter a value between 1 and 100.'}, false);
|
||||
@ -252,13 +287,11 @@ class Onequestionmark {
|
||||
var quote:String = "";
|
||||
|
||||
// Echobox response
|
||||
if (!m.mention_everyone) {
|
||||
if ((!m.mention_everyone) && (m.mentions.length == 0) && (m.mention_roles.length == 0)) {
|
||||
if (echobox.length > 0) {
|
||||
var ebchoice = randInt(0, echobox.length-1);
|
||||
//m.reply({content:'**Echobox, quote #${ebchoice+1}:** ${echobox[ebchoice]}'}, false);
|
||||
quote = '**Echobox, quote #${ebchoice+1}:** ${echobox[ebchoice]}';
|
||||
} else {
|
||||
//m.reply({content:'**Echobox:** There are no quotes in this server\'s Echobox yet.'}, false);
|
||||
quote = '**Echobox:** There are no quotes in this server\'s Echobox yet.';
|
||||
}
|
||||
|
||||
@ -276,7 +309,7 @@ class Onequestionmark {
|
||||
m.reply({content:quote}, false);
|
||||
}
|
||||
} else {
|
||||
m.reply({content:'**Echobox:** You cannot add `@everyone` to the Echobox.'}, false);
|
||||
m.reply({content:'**Echobox:** You cannot add mentions to the Echobox.'}, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user