mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-05 13:53:12 +02:00
Remove the last owner-specific command to Fidget
This commit is contained in:
@@ -15,7 +15,7 @@ You can invite the bot to your server using
|
||||
Be sure to also join the [home server](https://discord.gg/sbMe32W) for
|
||||
information and support.
|
||||
|
||||
## Commands (308)
|
||||
## Commands (307)
|
||||
### Utility:
|
||||
|
||||
* **prefix**: Shows or sets the command prefix.
|
||||
@@ -314,7 +314,6 @@ information and support.
|
||||
* **translate**: Translates text to a specific language.
|
||||
* **upside-down**: Flips text upside-down.
|
||||
* **url-encode**: Encodes text to URL-friendly characters.
|
||||
* **webhook**: Posts a message to the webhook defined in your `process.env`.
|
||||
* **yoda**: Converts text to Yoda speak.
|
||||
* **zalgo**: Converts text to zalgo.
|
||||
* **🅱**: Replaces b with 🅱.
|
||||
|
||||
@@ -1,37 +0,0 @@
|
||||
const { Command } = require('discord.js-commando');
|
||||
const snekfetch = require('snekfetch');
|
||||
const { WEBHOOK_ID, WEBHOOK_TOKEN } = process.env;
|
||||
|
||||
module.exports = class WebhookCommand extends Command {
|
||||
constructor(client) {
|
||||
super(client, {
|
||||
name: 'webhook',
|
||||
aliases: ['rin', 'rin-say'],
|
||||
group: 'text-edit',
|
||||
memberName: 'webhook',
|
||||
description: 'Posts a message to the webhook defined in your `process.env`.',
|
||||
details: 'Only the bot owner(s) may use this command.',
|
||||
ownerOnly: true,
|
||||
clientPermissions: ['MANAGE_MESSAGES'],
|
||||
args: [
|
||||
{
|
||||
key: 'content',
|
||||
prompt: 'What text would you like the webhook to say?',
|
||||
type: 'string'
|
||||
}
|
||||
]
|
||||
});
|
||||
}
|
||||
|
||||
async run(msg, { content }) {
|
||||
try {
|
||||
if (msg.channel.type === 'text' && msg.deletable) await msg.delete();
|
||||
await snekfetch
|
||||
.post(`https://discordapp.com/api/webhooks/${WEBHOOK_ID}/${WEBHOOK_TOKEN}`)
|
||||
.send({ content });
|
||||
return null;
|
||||
} catch (err) {
|
||||
return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
|
||||
}
|
||||
}
|
||||
};
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "xiao",
|
||||
"version": "75.0.1",
|
||||
"version": "75.0.2",
|
||||
"description": "Your personal server companion.",
|
||||
"main": "Xiao.js",
|
||||
"scripts": {
|
||||
|
||||
Reference in New Issue
Block a user