V0.4.1 - Remove ping command
This commit is contained in:
parent
6b2c2b4d51
commit
b4e16f6c56
|
@ -1,6 +1,6 @@
|
|||
export const config = {
|
||||
'name': 'Sweeper Bot', // Name of the bot
|
||||
'version': '0.4.0', // Version of the bot
|
||||
'version': '0.4.1', // Version of the bot
|
||||
'token': 'the_bot_token', // Discord API Token for this bot
|
||||
'localtoken': 'local_testing_token', // Discord API Token for a secondary OPTIONAL testing bot, THIS MUST BE DIFFERENT FROM "token"
|
||||
'prefix': 's!', // Prefix for all commands
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
import { ping } from './ping.ts';
|
||||
import { help } from './help.ts';
|
||||
import { info } from './info.ts';
|
||||
import { version } from './version.ts';
|
||||
|
@ -7,7 +6,6 @@ import { handleMentions } from './handleMentions.ts';
|
|||
import { sendMsg } from './sendMessage.ts';
|
||||
|
||||
export default {
|
||||
ping,
|
||||
help,
|
||||
info,
|
||||
version,
|
||||
|
|
|
@ -1,17 +0,0 @@
|
|||
import {
|
||||
// Discordeno deps
|
||||
Bot,
|
||||
Message,
|
||||
} from '../../deps.ts';
|
||||
import { generatePing } from '../commandUtils.ts';
|
||||
import utils from '../utils.ts';
|
||||
|
||||
export const ping = async (bot: Bot, message: Message) => {
|
||||
// Calculates ping between sending a message and editing it, giving a nice round-trip latency.
|
||||
try {
|
||||
const m = await bot.helpers.sendMessage(message.channelId, generatePing(-1));
|
||||
bot.helpers.editMessage(m.channelId, m.id, generatePing(m.timestamp - message.timestamp));
|
||||
} catch (e) {
|
||||
utils.commonLoggers.messageSendError('ping.ts:23', message, e);
|
||||
}
|
||||
};
|
|
@ -44,11 +44,6 @@ export const messageCreate = async (bot: Bot, message: Message) => {
|
|||
|
||||
// All commands below here
|
||||
switch (command) {
|
||||
case 'ping':
|
||||
// s!ping
|
||||
// Its a ping test, what else do you want.
|
||||
commands.ping(bot, message);
|
||||
break;
|
||||
case 'help':
|
||||
case 'h':
|
||||
case '?':
|
||||
|
|
Loading…
Reference in New Issue