diff --git a/README.md b/README.md index c25e8ac..57b367c 100644 --- a/README.md +++ b/README.md @@ -49,6 +49,8 @@ In case you want to (not recommend) - For next time, you can simply ```npm start``` to run bot. The previous command is for install and build process +- To Stop Bot and Logout *properly*, Type `logout` in the Bot Console + ## ðŸŒŋ Prerequisites - Linux (Sorry Windows User) @@ -77,25 +79,7 @@ In case you want to (not recommend) User Manual [Here](./docs/user_manual.md) -## 💎 Local Quotes - -To add more quotes on top of ASQ, create a file "morequotes.json" in data folder - -``` -{ - "āļ§āļēāļ—āļāļĢāļĢāļĄāļŠāļĨāļīāđˆāļĄ": [ Array of Your Custom Local Quotes Here ] -} -``` - -You can also add more keywords, songs or Facebooks to JSON files in data folder! - -### Keywords adding guideline - -Keywords must be all lowercase (if english alphabet exists) and no space in it. - -The reason is the bot process sentences by ignoring spaces and turning all english alphabet into lowercase, for example - -`Sinovac, sInOvAc, S I N O V A C` will all equivalent to "sinovac" +Advanced Usage (for Owner) [Here](./docs/advanced.md) ### Trained by People diff --git a/docs/advanced.md b/docs/advanced.md new file mode 100644 index 0000000..873e09f --- /dev/null +++ b/docs/advanced.md @@ -0,0 +1,45 @@ +# Advanced Usage + +## Local Quotes " morequotes.json + +To add more quotes on top of ASQ, create a file "morequotes.json" in data folder + +``` +{ + "āļ§āļēāļ—āļāļĢāļĢāļĄāļŠāļĨāļīāđˆāļĄ": [ Array of Your Custom Local Quotes Here ] +} +``` + +You can also add more keywords, songs or Facebooks to JSON files in data folder! + +## Keywords adding : keywords.json + +Keywords must be all lowercase (if english alphabet exists) and no space in it. + +The reason is the bot process sentences by ignoring spaces and turning all english alphabet into lowercase, for example + +`Sinovac, sInOvAc, S I N O V A C` will all equivalent to "sinovac" + +## Others in data + +Please look at the schema and add your own in same theme as it + +## config/bot_settings.json + +- Copy bot_settings.template.json to bot_settings.json + +- Edit properties you would like to + +- See src/template/BotSettings.template.ts for more info + +## Salim Shell + +- Do #!salim disable to disable all bot's activity on that channel ~~including sending data to Thai Government~~ + +- Do #!salim enable again to remove that + +- Do #!salim sudo to execute Console Command without Console + +## Console + +- Please look at source code (src/console/Console.ts) for more details diff --git a/package.json b/package.json index d7b9627..2faafd5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "salim-bot", - "version": "2.1.418", + "version": "2.1.420", "description": "This bot is Salim. Whenever you trigger it, It become mad.", "type": "module", "main": "dist/bot.js", diff --git a/src/console/SalimShell.ts b/src/console/SalimShell.ts index c6fb0c7..01f0137 100644 --- a/src/console/SalimShell.ts +++ b/src/console/SalimShell.ts @@ -1,6 +1,6 @@ // * SalimShell.ts : Shell But Salim -import { DMChannel, NewsChannel, TextChannel, Message, VoiceChannel } from "discord.js"; +import { DMChannel, NewsChannel, TextChannel, Message } from "discord.js"; import * as fs from "fs/promises"; @@ -70,19 +70,6 @@ export default class SalimShell { } break; } - case "tievoice": - { - if (!msg.member?.voice.channel) { - msg.reply("āļˆāļ°āđƒāļŦāđ‰āļ‰āļąāļ™āđ„āļ›āļ„āļļāļĒāļāļąāļšāļœāļĩāļŦāļĢāļ­"); - return; - } - - const traceback = await SalimShell.tieVoiceChannel(msg.member.voice.channel); - if (traceback) { - msg.reply(traceback); - } - break; - } case "sudo": { if (!BotSettings.settings.owner.includes(msg.author.id)) { @@ -147,18 +134,6 @@ export default class SalimShell { } } - private static async tieVoiceChannel(channel: VoiceChannel): Promise { - if (SalimShell.shellConfig.config.tiedVoice == channel.id) { - - return "Already Tied to this Channel"; - } - - SalimShell.shellConfig.config.tiedVoice = channel.id; - SalimShell.saveConfig(); - Logger.log(`[Salim Shell] Tied to ${channel.name}`); - return ""; - } - private static async saveConfig(): Promise { await fs.writeFile(configFilePath, JSON.stringify(SalimShell.shellConfig, null, 4)); Logger.log("Save Config Success", "SUCCESS");