fix/retry-sending-failed-msgs #1
|
|
@ -302,6 +302,14 @@
|
|||
"name": "devtest",
|
||||
"description": "[BOT OWNER ONLY] Test the bot with a sample message",
|
||||
"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 });
|
||||
|
||||
//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"));
|
||||
output += "Triggered handleDiscord with test message.\n";
|
||||
interaction.editReply({ content: output, ephemeral: true });
|
||||
|
|
|
|||
Loading…
Reference in a new issue