diff --git a/src/commands/general/migratedCommand.ts b/src/commands/general/migratedCommand.ts new file mode 100644 index 00000000..bd9c64b9 --- /dev/null +++ b/src/commands/general/migratedCommand.ts @@ -0,0 +1,65 @@ +import { MessageCommandDefinition } from '../../lib/command'; +import { CommandCategory } from '../../constants'; +import { makeEmbed } from '../../lib/embed'; + +const migratedCommandEmbed = makeEmbed({ + title: 'FlyByWire Discord Bot | Command replaced with a `/`-command', + description: 'The command your are trying to execute is no longer served as a prefix command. Instead look for a `/`-based command with the same functionality.', +}); + +export const migratedCommand: MessageCommandDefinition = { + name: [ + 'ask', + 'av', + 'avatar', + 'ban', + 'birthday', + 'cache-update', + 'cacheupdate', + 'calc', + 'count', + 'deletewarn', + 'deletewarning', + 'delwarn', + 'ev', + 'event', + 'events', + 'faq', + 'flight', + 'flights', + 'listwarn', + 'listwarnings', + 'liveflights', + 'membercount', + 'metar', + 'migrated-command', + 'ping', + 'pr', + 'removetimeout', + 'roleassignment', + 'roleinfo', + 'rules', + 'simbriefdata', + 'slowmode', + 'station', + 'taf', + 'timeout', + 'unban', + 'untimeout', + 'vatdata', + 'vatev', + 'vatevents', + 'vatsim', + 'vatsimdata', + 'vatsimevents', + 'wa', + 'warn', + 'warnings', + 'warns', + 'whois', + 'zulu', + ], + description: 'Provides an explanation for migrated commands', + category: CommandCategory.GENERAL, + genericEmbed: migratedCommandEmbed, +}; diff --git a/src/commands/index.ts b/src/commands/index.ts index 3b8437aa..a1d67763 100644 --- a/src/commands/index.ts +++ b/src/commands/index.ts @@ -1,22 +1,16 @@ import { BaseCommandDefinition } from '../lib/command'; import Logger from '../lib/logger'; import { typeCommand } from '../lib/typeCommand'; -import { ping } from './utils/ping'; -import { whois } from './moderation/whois'; import { bruheg } from './memes/bruheg'; import { boratorium } from './memes/boratorium'; import { efb } from './aircraft/efb'; import { deadzones } from './support/deadzones'; import { screens } from './aircraft/screens'; import { when } from './general/when'; -import { ban } from './moderation/ban'; -import { unban } from './moderation/unban'; import { trythis } from './support/trythis'; import { experimental } from './aircraft/experimental'; import { versions } from './aircraft/versions'; -import { membercount } from './utils/membercount'; import { installer } from './general/installer'; -import { roleinfo } from './utils/roleinfo'; import { adirs } from './aircraft/adirs'; import { logs } from './support/logs'; import { reportedissues } from './support/reportedissues'; @@ -38,7 +32,6 @@ import { afloor } from './aircraft/afloor'; import { airframe } from './aircraft/airframe'; import { xbox } from './general/xbox'; import { willithave } from './general/willithave'; -import { faq } from './moderation/faq'; import { community } from './support/community'; import { roadmap } from './general/roadmap'; import { clean } from './support/clean-install'; @@ -48,11 +41,9 @@ import { printer } from './aircraft/printer'; import { where } from './support/where'; import { ctrlE } from './aircraft/ctrlE'; import { weather } from './aircraft/weather'; -import { metar } from './utils/metar'; import { qa } from './general/qa'; import { ptu } from './memes/ptu'; import { cursor } from './support/cursor'; -import { avatar } from './utils/avatar'; import { coffee } from './memes/coffee'; import { defaultmeme } from './memes/default'; import { guard } from './memes/guard'; @@ -64,7 +55,6 @@ import { poggers } from './memes/poggers'; import { pov } from './memes/pov'; import { shame } from './memes/shame'; import { xp } from './memes/xp'; -import { station } from './utils/station'; import { addon } from './memes/addon'; import { freetext } from './aircraft/freetext'; import { cowsay } from './memes/cowsay'; @@ -78,7 +68,6 @@ import { build } from './support/build'; import { tug } from './support/tug'; import { crak } from './memes/crak'; import { weightBalance } from './aircraft/weightBalance'; -import { rules } from './moderation/rules'; import { fixinfo } from './aircraft/fixinfo'; import { welcome } from './moderation/welcome'; import { sop } from './aircraft/sop'; @@ -96,16 +85,12 @@ import { oim } from './memes/oim'; import { wasm } from './support/wasm'; import { CPDLC } from './aircraft/cpdlc'; import { simbriefimport } from './aircraft/simbriefimport'; -import { roleassignment } from './moderation/roleassignment'; -import { timeout } from './moderation/timeout'; -import { untimeout } from './moderation/untimeout'; import { audio } from './aircraft/audio'; import { flexTemp } from './aircraft/flex-temp'; import { preflight } from './aircraft/preflight'; import { storedWaypoint } from './aircraft/stored-waypoint'; import { tcas } from './aircraft/tcas'; import { msfsdisc } from './general/msfsdiscord'; -import { count } from './utils/count'; import { shomas } from './memes/shomas'; import { pw } from './memes/pw'; import { abbreviations } from './support/abbreviations'; @@ -114,30 +99,21 @@ import { airac } from './support/airac'; import { mico } from './memes/mico'; import { translate } from './general/translate'; import { github } from './aircraft/github'; -import { zulu } from './utils/zulu'; import { latlongfix } from './general/latlongfix'; import { headwind } from './general/headwind'; -import { wolframalpha } from './utils/wolframalpha'; -import { birthday } from './utils/birthday'; import { recommendedSettings } from './aircraft/recommendedsettings'; -import { warn } from './moderation/warn/warn'; -import { listWarnings } from './moderation/warn/listWarnings'; -import { deleteWarn } from './moderation/warn/deleteWarn'; import { atc } from './aircraft/atc'; import { market } from './support/market'; import { takeoffIssues } from './aircraft/takeoffissues'; import { simbridge } from './support/simbridge'; import { fma } from './aircraft/fma'; import { noHello } from './memes/noHello'; -import { vatsimEvents } from './utils/vatsimEvents'; -import { flights } from './utils/flights'; import { docsearch } from './general/docsearch'; import { dlss } from './support/dlss'; import { temporarycommandedit } from './moderation/temporaryCommandEdit'; import { temporarycommand } from './general/temporaryCommand'; import { yourControls } from './general/yourControls'; import { notams } from './general/notams'; -import { vatsimData } from './utils/vatsimData'; import { website } from './general/website'; import { verticalGuidance } from './aircraft/verticalGuidance'; import { verticalGuidanceSymbols } from './aircraft/verticalGuidanceSymbols'; @@ -156,41 +132,60 @@ import { winss } from './support/winss'; import { simbridgeLog } from './support/simbridgeLog'; import { sticky } from './moderation/sticky'; import { navRouteTypes } from './general/navRouteTypes'; -import { cacheUpdate } from './moderation/cacheUpdate'; import { navigraph } from './general/navigraph'; import { botIssue } from './support/botIssue'; -import { slowMode } from './moderation/slowmode'; import { econnreset } from './support/econnreset'; -import { pr } from './utils/pr'; import { gsxIntegration } from './aircraft/gsxIntegration'; import { supportGuide } from './support/supportGuide'; -import { simbriefdata } from './utils/simbriefdata'; import { tca } from './support/tca'; -import { taf } from './utils/taf'; import { remoteEfb } from './support/remoteEfb'; import { brakeCheck } from './support/brakeCheck'; import { spad } from './general/spad'; import { devLanguages } from './general/devLanguages'; -import { simbridgeDebug } from './support/simbridgeDebug' +import { simbridgeDebug } from './support/simbridgeDebug'; +import { migratedCommand } from './general/migratedCommand'; +//import { avatar } from './utils/avatar'; +//import { ban } from './moderation/ban'; +//import { birthday } from './utils/birthday'; +//import { cacheUpdate } from './moderation/cacheUpdate'; +//import { count } from './utils/count'; +//import { deleteWarn } from './moderation/warn/deleteWarn'; +//import { faq } from './moderation/faq'; +//import { flights } from './utils/flights'; +//import { listWarnings } from './moderation/warn/listWarnings'; +//import { membercount } from './utils/membercount'; +//import { metar } from './utils/metar'; +//import { ping } from './utils/ping'; +//import { pr } from './utils/pr'; +//import { roleassignment } from './moderation/roleassignment'; +//import { roleinfo } from './utils/roleinfo'; +//import { rules } from './moderation/rules'; +//import { simbriefdata } from './utils/simbriefdata'; +//import { slowMode } from './moderation/slowmode'; +//import { station } from './utils/station'; +//import { taf } from './utils/taf'; +//import { timeout } from './moderation/timeout'; +//import { unban } from './moderation/unban'; +//import { untimeout } from './moderation/untimeout'; +//import { vatsimData } from './utils/vatsimData'; +//import { vatsimEvents } from './utils/vatsimEvents'; +//import { warn } from './moderation/warn/warn'; +//import { whois } from './moderation/whois'; +//import { wolframalpha } from './utils/wolframalpha'; +//import { zulu } from './utils/zulu'; const commands: BaseCommandDefinition[] = [ typeCommand, - ping, - whois, bruheg, boratorium, efb, deadzones, screens, when, - ban, - unban, trythis, experimental, versions, - membercount, installer, - roleinfo, adirs, logs, reportedissues, @@ -212,7 +207,6 @@ const commands: BaseCommandDefinition[] = [ airframe, xbox, willithave, - faq, community, roadmap, clean, @@ -222,11 +216,9 @@ const commands: BaseCommandDefinition[] = [ where, ctrlE, weather, - metar, qa, ptu, cursor, - avatar, coffee, defaultmeme, guard, @@ -238,7 +230,6 @@ const commands: BaseCommandDefinition[] = [ pov, shame, xp, - station, addon, freetext, cowsay, @@ -252,7 +243,6 @@ const commands: BaseCommandDefinition[] = [ tug, crak, weightBalance, - rules, fixinfo, welcome, sop, @@ -270,16 +260,12 @@ const commands: BaseCommandDefinition[] = [ wasm, CPDLC, simbriefimport, - roleassignment, - timeout, - untimeout, audio, flexTemp, preflight, storedWaypoint, tcas, msfsdisc, - count, shomas, pw, abbreviations, @@ -288,30 +274,21 @@ const commands: BaseCommandDefinition[] = [ mico, translate, github, - zulu, latlongfix, headwind, - wolframalpha, - birthday, recommendedSettings, - warn, - listWarnings, - deleteWarn, atc, market, takeoffIssues, simbridge, fma, noHello, - vatsimEvents, - flights, docsearch, dlss, temporarycommandedit, temporarycommand, yourControls, notams, - vatsimData, website, verticalGuidance, verticalGuidanceSymbols, @@ -330,22 +307,47 @@ const commands: BaseCommandDefinition[] = [ simbridgeLog, sticky, navRouteTypes, - cacheUpdate, navigraph, botIssue, - slowMode, econnreset, - pr, gsxIntegration, tca, supportGuide, - simbriefdata, - taf, remoteEfb, brakeCheck, spad, devLanguages, simbridgeDebug, + migratedCommand, + //avatar, + //ban, + //birthday, + //cacheUpdate, + //count, + //deleteWarn, + //faq, + //flights, + //listWarnings, + //membercount, + //metar, + //ping, + //pr, + //roleassignment, + //roleinfo, + //rules, + //simbriefdata, + //slowMode, + //station, + //taf, + //timeout, + //unban, + //untimeout, + //vatsimData, + //vatsimEvents, + //warn, + //whois, + //wolframalpha, + //zulu, ]; const commandsObject: { [k: string]: BaseCommandDefinition } = {};