Bleh
This commit is contained in:
parent
43864df9c0
commit
0ccebafb1d
|
|
@ -302,6 +302,14 @@
|
||||||
"name": "devtest",
|
"name": "devtest",
|
||||||
"description": "[BOT OWNER ONLY] Test the bot with a sample message",
|
"description": "[BOT OWNER ONLY] Test the bot with a sample message",
|
||||||
"default_member_permissions": 0,
|
"default_member_permissions": 0,
|
||||||
"type": 1
|
"type": 1,
|
||||||
|
"options": [
|
||||||
|
{
|
||||||
|
"name": "randstr",
|
||||||
|
"description": "override random string in test message for testing",
|
||||||
|
"type": 3,
|
||||||
|
"required": false
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
2
index.js
2
index.js
|
|
@ -1439,6 +1439,8 @@ discord.on("interactionCreate", async (interaction) => {
|
||||||
interaction.editReply({ content: output, ephemeral: true });
|
interaction.editReply({ content: output, ephemeral: true });
|
||||||
|
|
||||||
//2. directly trigger handleDiscord with a fake message for the fake room.
|
//2. directly trigger handleDiscord with a fake message for the fake room.
|
||||||
|
|
||||||
|
let randStr = interaction.options.getString("randstr") || Math.random().toString(36).substring(2, 15)
|
||||||
handleDiscord(require("./testmsg.json"));
|
handleDiscord(require("./testmsg.json"));
|
||||||
output += "Triggered handleDiscord with test message.\n";
|
output += "Triggered handleDiscord with test message.\n";
|
||||||
interaction.editReply({ content: output, ephemeral: true });
|
interaction.editReply({ content: output, ephemeral: true });
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue