V0.4.1 - Remove ping command

This commit is contained in:
Ean Milligan (Bastion) 2022-09-09 01:16:46 -04:00
parent 6b2c2b4d51
commit b4e16f6c56
4 changed files with 1 additions and 25 deletions

View File

@ -1,6 +1,6 @@
export const config = { export const config = {
'name': 'Sweeper Bot', // Name of the bot '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 '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" '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 'prefix': 's!', // Prefix for all commands

View File

@ -1,4 +1,3 @@
import { ping } from './ping.ts';
import { help } from './help.ts'; import { help } from './help.ts';
import { info } from './info.ts'; import { info } from './info.ts';
import { version } from './version.ts'; import { version } from './version.ts';
@ -7,7 +6,6 @@ import { handleMentions } from './handleMentions.ts';
import { sendMsg } from './sendMessage.ts'; import { sendMsg } from './sendMessage.ts';
export default { export default {
ping,
help, help,
info, info,
version, version,

View File

@ -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);
}
};

View File

@ -44,11 +44,6 @@ export const messageCreate = async (bot: Bot, message: Message) => {
// All commands below here // All commands below here
switch (command) { switch (command) {
case 'ping':
// s!ping
// Its a ping test, what else do you want.
commands.ping(bot, message);
break;
case 'help': case 'help':
case 'h': case 'h':
case '?': case '?':