From 8dd84b96944f0cafe20ff0e505548a4ef9d666c4 Mon Sep 17 00:00:00 2001 From: TRACTION <19631364+iamtraction@users.noreply.github.com> Date: Fri, 1 Dec 2023 18:25:07 +0530 Subject: [PATCH 01/11] schedulers(liveStreams): filter invalid channels before request Signed-off-by: TRACTION <19631364+iamtraction@users.noreply.github.com> --- src/schedulers/liveStreams.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/schedulers/liveStreams.ts b/src/schedulers/liveStreams.ts index 50fbbe9dd..4e6070838 100644 --- a/src/schedulers/liveStreams.ts +++ b/src/schedulers/liveStreams.ts @@ -9,6 +9,7 @@ import GuildModel from "../models/Guild.js"; import memcache from "../utils/memcache.js"; import * as requests from "../utils/requests.js"; import { COLORS } from "../utils/constants.js"; +import { TWITCH_CHANNEL } from "../utils/regex.js"; import Settings from "../utils/settings.js"; import { TwitchStream } from "../types.js"; @@ -40,9 +41,10 @@ class LiveStreamNotificationScheduler extends Scheduler { for (const guild of guildDocuments) { // twitch streams - if (guild.twitchNotificationChannel && this.client.guilds.cache.get(guild.id).channels.cache.has(guild.twitchNotificationChannel) && guild.twitchNotificationUsers?.length) { + const twitchNotificationUsers = guild.twitchNotificationUsers.filter(u => TWITCH_CHANNEL.test(u)); + if (guild.twitchNotificationChannel && this.client.guilds.cache.get(guild.id).channels.cache.has(guild.twitchNotificationChannel) && twitchNotificationUsers?.length) { // get current live streams - const { body, statusCode } = await requests.get("https://api.twitch.tv/helix/streams/?user_login=" + guild.twitchNotificationUsers.join("&user_login="), { + const { body, statusCode } = await requests.get("https://api.twitch.tv/helix/streams/?user_login=" + twitchNotificationUsers.join("&user_login="), { "authorization": "Bearer " + (this.client.settings as Settings).get("twitch").accessToken, "client-id": (this.client.settings as Settings).get("twitch").clientId, }); From 31f66a7528e20daa78bd7172f44871945e624094 Mon Sep 17 00:00:00 2001 From: TRACTION <19631364+iamtraction@users.noreply.github.com> Date: Fri, 1 Dec 2023 18:26:17 +0530 Subject: [PATCH 02/11] schedulers(liveStreams): return after api error has logged Signed-off-by: TRACTION <19631364+iamtraction@users.noreply.github.com> --- src/schedulers/liveStreams.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/schedulers/liveStreams.ts b/src/schedulers/liveStreams.ts index 4e6070838..42cd5c556 100644 --- a/src/schedulers/liveStreams.ts +++ b/src/schedulers/liveStreams.ts @@ -50,7 +50,7 @@ class LiveStreamNotificationScheduler extends Scheduler { }); if (statusCode >= 400) { - Logger.error(await body.json()); + return Logger.error(await body.json()); } const streams: TwitchStream[] = (await body.json())?.["data"] || []; From a1558a48bd71707b3008af9da03c199679e1dc00 Mon Sep 17 00:00:00 2001 From: TRACTION <19631364+iamtraction@users.noreply.github.com> Date: Fri, 1 Dec 2023 18:28:58 +0530 Subject: [PATCH 03/11] version: 10.13.1 Signed-off-by: TRACTION <19631364+iamtraction@users.noreply.github.com> --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 111053249..294fb9d8c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "bastion", - "version": "10.13.0", + "version": "10.13.1", "description": "Get an enhanced Discord experience!", "type": "module", "homepage": "https://bastion.traction.one", From ea9467f96c733a815ba910aadd677e46e67cb1ed Mon Sep 17 00:00:00 2001 From: TRACTION <19631364+iamtraction@users.noreply.github.com> Date: Sun, 3 Dec 2023 03:43:57 +0530 Subject: [PATCH 04/11] deps: add openai Signed-off-by: TRACTION <19631364+iamtraction@users.noreply.github.com> --- package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/package.json b/package.json index 294fb9d8c..daace453e 100644 --- a/package.json +++ b/package.json @@ -40,6 +40,7 @@ "jsdom": "^22.1.0", "libsodium-wrappers": "^0.7.13", "mathjs": "^12.1.0", + "openai": "^4.20.1", "play-dl": "^1.9.7", "r6api.js": "^4.4.1", "undici": "^5.27.2", From f160fa8339a21446231e17a47fa877e626bd00c1 Mon Sep 17 00:00:00 2001 From: TRACTION <19631364+iamtraction@users.noreply.github.com> Date: Sun, 3 Dec 2023 03:45:29 +0530 Subject: [PATCH 05/11] types: add openai property Signed-off-by: TRACTION <19631364+iamtraction@users.noreply.github.com> --- src/types.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/types.ts b/src/types.ts index 6c15aff6e..9390513d4 100644 --- a/src/types.ts +++ b/src/types.ts @@ -12,6 +12,11 @@ export namespace bastion { auth?: string; coinMarketCapApiKey?: string; nasaApiKey?: string; + openai?: { + apiKey?: string; + model?: string; + maxTokens?: number; + }; openWeatherMapApiKey?: string; tmdbApiKey?: string; trackerNetworkApiKey?: string; From 5fcbb3e36524f17cce98977df5b5b0e572201f06 Mon Sep 17 00:00:00 2001 From: TRACTION <19631364+iamtraction@users.noreply.github.com> Date: Sun, 3 Dec 2023 03:46:27 +0530 Subject: [PATCH 06/11] settings: update example Signed-off-by: TRACTION <19631364+iamtraction@users.noreply.github.com> --- settings.example.yaml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/settings.example.yaml b/settings.example.yaml index 41c0a537e..adac2bef7 100644 --- a/settings.example.yaml +++ b/settings.example.yaml @@ -79,6 +79,16 @@ auth: "" coinMarketCapApiKey: "" # Required for `apod` command. nasaApiKey: "DEMO_KEY" +# Required for `chat` command to use the OpenAI's ChatGPT APIs. +# API pricing depends on these values. +# For more details, check https://openai.com/pricing +openai: + apiKey: "" + # If you want to use GPT-4, set `model` to `gpt-4`. + model: "gpt-3.5-turbo" + # Change the `maxTokens` value to set the length of ChatGPT's responses. + # https://platform.openai.com/tokenizer + maxTokens: 100 # Required for `weather` command. openWeatherMapApiKey: "" # Required for `movie` and `tv` commands. From 4850e10287c313b3e5325a1d36a315c9d4d87006 Mon Sep 17 00:00:00 2001 From: TRACTION <19631364+iamtraction@users.noreply.github.com> Date: Sun, 3 Dec 2023 04:28:32 +0530 Subject: [PATCH 07/11] commands: add chat command Signed-off-by: TRACTION <19631364+iamtraction@users.noreply.github.com> --- src/commands/chat.ts | 55 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 src/commands/chat.ts diff --git a/src/commands/chat.ts b/src/commands/chat.ts new file mode 100644 index 000000000..8fd4d7bd3 --- /dev/null +++ b/src/commands/chat.ts @@ -0,0 +1,55 @@ +/*! + * @author TRACTION (iamtraction) + * @copyright 2023 + */ +import { ApplicationCommandOptionType, ChatInputCommandInteraction } from "discord.js"; +import { Client, Command } from "@bastion/tesseract"; +import OpenAI from "openai"; + +import Settings from "../utils/settings.js"; + +class ChatCommand extends Command { + constructor() { + super({ + name: "chat", + description: "Ask questions or chat with ChatGPT from OpenAI.", + owner: true, + options: [ + { + type: ApplicationCommandOptionType.String, + name: "message", + description: "Your message.", + required: true, + }, + ], + }); + } + + public async exec(interaction: ChatInputCommandInteraction<"cached">): Promise { + await interaction.deferReply(); + + const message = interaction.options.getString("message"); + + const openai = new OpenAI({ + apiKey: ((interaction.client as Client).settings as Settings).get("openai").apiKey, + }); + + const response = await openai.chat.completions.create({ + model: ((interaction.client as Client).settings as Settings).get("openai").model || "gpt-3.5-turbo", + messages: [ + { + role: "user", + content: message, + }, + ], + max_tokens: ((interaction.client as Client).settings as Settings).get("openai").maxTokens || 100, + user: interaction.member.id, + }); + + await interaction.editReply({ + content: response.choices[0].message.content, + }); + } +} + +export { ChatCommand as Command }; From de490c35eb5e1781565ab69407dc2f5e418a7db1 Mon Sep 17 00:00:00 2001 From: TRACTION <19631364+iamtraction@users.noreply.github.com> Date: Sun, 3 Dec 2023 05:09:41 +0530 Subject: [PATCH 08/11] commands: add image generate command Signed-off-by: TRACTION <19631364+iamtraction@users.noreply.github.com> --- src/commands/image/generate.ts | 74 ++++++++++++++++++++++++++++++++++ 1 file changed, 74 insertions(+) create mode 100644 src/commands/image/generate.ts diff --git a/src/commands/image/generate.ts b/src/commands/image/generate.ts new file mode 100644 index 000000000..0e729f427 --- /dev/null +++ b/src/commands/image/generate.ts @@ -0,0 +1,74 @@ +/*! + * @author TRACTION (iamtraction) + * @copyright 2023 + */ +import { ApplicationCommandOptionType, ChatInputCommandInteraction } from "discord.js"; +import { Client, Command } from "@bastion/tesseract"; +import OpenAI from "openai"; + +import Settings from "../../utils/settings.js"; + +class ImageGenerateCommand extends Command { + constructor() { + super({ + name: "generate", + description: "Generate an image with DALL-E from OpenAI.", + owner: true, + options: [ + { + type: ApplicationCommandOptionType.String, + name: "prompt", + description: "A description of the desired image.", + required: true, + }, + { + type: ApplicationCommandOptionType.String, + name: "size", + description: "The size of the generated image.", + choices: [ + { + name: "Square", + value: "1024x1024", + }, + { + name: "Portrait", + value: "1024x1792", + }, + { + name: "Landscape", + value: "1792x1024", + }, + ], + }, + ], + }); + } + + public async exec(interaction: ChatInputCommandInteraction<"cached">): Promise { + await interaction.deferReply(); + + const prompt = interaction.options.getString("prompt"); + const size = interaction.options.getString("size") as "1024x1024" | "1024x1792" | "1792x1024" || "1024x1024"; + + const openai = new OpenAI({ + apiKey: ((interaction.client as Client).settings as Settings).get("openai").apiKey, + }); + + const response = await openai.images.generate({ + model: "dall-e-3", + prompt: prompt, + response_format: "url", + size: size, + user: interaction.member.id, + }); + + await interaction.editReply({ + content: response.data[0].revised_prompt, + files: [{ + attachment: response.data[0].url, + }], + }); + } +} + +export { ImageGenerateCommand as Command }; From b9a892ac49e98b051eef8e5e1df5c9902d46c1ed Mon Sep 17 00:00:00 2001 From: TRACTION <19631364+iamtraction@users.noreply.github.com> Date: Sun, 3 Dec 2023 05:24:02 +0530 Subject: [PATCH 09/11] chore: generate commands data Signed-off-by: TRACTION <19631364+iamtraction@users.noreply.github.com> --- commands.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/commands.json b/commands.json index 26aecb22f..e1d8ae205 100644 --- a/commands.json +++ b/commands.json @@ -1 +1 @@ -[{"type":1,"name":"about","description":"Displays some basic information to help you get started with Bastion.","options":[]},{"type":1,"name":"calculate","description":"Evaluates the specified mathematical expression.","options":[{"type":3,"name":"expression","description":"The expression you want to evaluate.","required":true}]},{"type":1,"name":"changes","description":"See the changes introduced in the current version of Bastion.","options":[]},{"type":1,"name":"channel","description":"Command Group - channel","options":[{"type":1,"name":"create","description":"Create a new channel in the server.","options":[{"type":3,"name":"name","description":"The name of the new channel.","required":true},{"type":4,"name":"type","description":"The type of the new channel.","choices":[{"name":"Text","value":0},{"name":"Voice","value":2},{"name":"Announcement","value":5},{"name":"Stage","value":13},{"name":"Category","value":4}],"required":true},{"type":3,"name":"topic","description":"The topic for the new channel."},{"type":4,"name":"limit","description":"Limit the number of users for the new (voice) channel.","min_value":1,"max_value":99},{"type":4,"name":"slowmode","description":"Enable slowmode with the specified interval (in seconds).","min_value":0,"max_value":21600},{"type":5,"name":"nsfw","description":"Should the channel be NSFW."},{"type":3,"name":"reason","description":"The reason for creating the channel."}]},{"type":1,"name":"delete","description":"Delete the current (or the specified) channel.","options":[{"type":7,"name":"channel","description":"The channel you want to delete."},{"type":3,"name":"reason","description":"The reason for deleting the channel."}]},{"type":1,"name":"info","description":"Displays information on the current (or specified) channel.","options":[{"type":7,"name":"channel","description":"The channel whose information you want to display."}]},{"type":1,"name":"update","description":"Update the specified channel in the server.","options":[{"type":7,"name":"channel","description":"The channel you want to update."},{"type":3,"name":"name","description":"The new name for the channel."},{"type":3,"name":"topic","description":"The new topic for the channel."},{"type":4,"name":"limit","description":"The new limit of users for the (voice) channel.","min_value":1,"max_value":99},{"type":4,"name":"slowmode","description":"The new slowmode interval (in seconds).","min_value":0,"max_value":21600},{"type":5,"name":"nsfw","description":"Should the channel be NSFW."},{"type":3,"name":"reason","description":"The reason for updating the channel."}]}]},{"type":1,"name":"claim","description":"Claim any rewards available to you.","options":[]},{"type":1,"name":"comic","description":"Command Group - comic","options":[{"type":1,"name":"garfield","description":"Check the latest Garfield comic.","options":[]},{"type":1,"name":"phd","description":"Check the latest PHD comic, or the specified issue.","options":[{"type":4,"name":"issue","description":"Issue number to see the comic.","min_value":1}]},{"type":1,"name":"xkcd","description":"Check the latest xkcd comic, or the specified issue.","options":[{"type":4,"name":"issue","description":"Issue number to see the comic.","min_value":1}]}]},{"type":1,"name":"config","description":"Command Group - config","options":[{"type":1,"name":"auto-roles","description":"Configure roles that will be auto assigned to members when they join the server.","options":[{"type":8,"name":"role","description":"The role you want to add or remove as an auto role."},{"type":5,"name":"bots","description":"Whether this role should be auto assigned to bots."}]},{"type":1,"name":"auto-threads","description":"Configure auto threads in the server.","options":[]},{"type":1,"name":"farewell","description":"Configure farewell messages in the server.","options":[{"type":7,"name":"channel","description":"The channel where the farewell messages will be sent.","channel_types":[0]},{"type":3,"name":"message","description":"The custom farewell message."},{"type":4,"name":"timeout","description":"The interval after which the farewell message will be deleted.","min_value":1,"max_value":30}]},{"type":2,"name":"filter","description":"Subcommand Group - filter","options":[{"type":1,"name":"emails","description":"Configure Email Filter AutoMod rule in the server.","options":[]},{"type":1,"name":"invites","description":"Configure Invite Filter AutoMod rule in the server.","options":[]},{"type":1,"name":"links","description":"Configure Link Filter AutoMod rule in the server.","options":[]}]},{"type":1,"name":"gambling","description":"Configure gambling in the server.","options":[{"type":10,"name":"multiplier","description":"The reward multiplier."}]},{"type":1,"name":"gamification","description":"Configure gamification in the server.","options":[{"type":5,"name":"messages","description":"Should it show the level up messages."},{"type":7,"name":"channel","description":"The channel where the level up messages will be sent.","channel_types":[0]},{"type":10,"name":"multiplier","description":"The reward multiplier."}]},{"type":1,"name":"greeting","description":"Configure greeting messages in the server.","options":[{"type":7,"name":"channel","description":"The channel where the greeting messages will be sent.","channel_types":[0]},{"type":3,"name":"message","description":"The custom greeting message."},{"type":4,"name":"timeout","description":"The interval after which the greeting message will be deleted.","min_value":1,"max_value":30}]},{"type":1,"name":"live-streams","description":"Follow streamers and get notified in the specified channel when they go live.","options":[{"type":3,"name":"twitch","description":"The twitch channel you want to follow."},{"type":7,"name":"channel","description":"The channel where the notifications will be sent.","channel_types":[0]},{"type":3,"name":"message","description":"The custom message for notification."}]},{"type":2,"name":"logs","description":"Subcommand Group - logs","options":[{"type":1,"name":"content","description":"Configure whether deleted and edited message content should be shown in server logs.","options":[]},{"type":1,"name":"mod","description":"Configure channel for logging moderation events.","options":[{"type":7,"name":"channel","description":"The channel where moderation events will be logged.","channel_types":[0]}]},{"type":1,"name":"server","description":"Configure channel for logging server events.","options":[{"type":7,"name":"channel","description":"The channel where server events will be logged.","channel_types":[0]}]}]},{"type":1,"name":"music","description":"Configure music in the server.","options":[]},{"type":1,"name":"reports","description":"Configure user reports in the server.","options":[{"type":7,"name":"channel","description":"The channel where user reports will be sent.","channel_types":[0]}]},{"type":2,"name":"select-roles","description":"Subcommand Group - select-roles","options":[{"type":1,"name":"add","description":"Create a new Select Role Group.","options":[{"type":3,"name":"message","description":"The content of the Select Role Message for users.","required":true},{"type":7,"name":"channel","description":"The channel where you want to send the Select Role Message.","channel_types":[5,0,2]},{"type":4,"name":"type","description":"The behavior of the Select Role Group.","choices":[{"name":"Add Only","value":1},{"name":"Remove Only","value":2}]},{"type":4,"name":"ui","description":"The variant of Select Role UI.","choices":[{"name":"Buttons","value":0},{"name":"Select Menu","value":1}]},{"type":4,"name":"min","description":"The minimum number of roles users are allowed to select.","min_value":0,"max_value":25},{"type":4,"name":"max","description":"The maximum number of roles users are allowed to select.","min_value":1,"max_value":25}]},{"type":1,"name":"list","description":"List all the Select Role Groups.","options":[{"type":7,"name":"channel","description":"List Select Role Groups only from this channel.","channel_types":[5,0,2]}]},{"type":1,"name":"remove","description":"Remove the specified Select Role Group.","options":[{"type":3,"name":"id","description":"The Select Role Group ID.","required":true}]}]},{"type":1,"name":"self-roles","description":"Configure roles that users can assign to themselves.","options":[{"type":8,"name":"role","description":"The role you want to add or remove as a self role."}]},{"type":1,"name":"starboard","description":"Configure starboard in the server.","options":[{"type":7,"name":"channel","description":"The channel where starred messages will be logged.","channel_types":[0]},{"type":4,"name":"threshold","description":"The minimum number of stars a message needs.","min_value":2}]},{"type":1,"name":"streamer-role","description":"Set the role someone is assigned in the server when they start streaming.","options":[{"type":8,"name":"role","description":"The role that should be assigned to users."}]},{"type":1,"name":"suggestions","description":"Configure suggestions in the server.","options":[{"type":7,"name":"channel","description":"The channel where suggestions will be sent.","channel_types":[0]}]},{"type":1,"name":"triggers","description":"Configure triggers and responses in the server.","options":[{"type":3,"name":"add","description":"The pattern that will trigger the response."},{"type":3,"name":"remove","description":"The trigger that you want to remove."},{"type":3,"name":"message","description":"The message response for the trigger."},{"type":3,"name":"emoji","description":"The reaction emoji response for the trigger."}]},{"type":1,"name":"verification","description":"Configure verification in the server.","options":[{"type":8,"name":"role","description":"The role users are assigned when are verified."},{"type":3,"name":"text","description":"Type a text message that will be shown to the users trying to verify."}]},{"type":1,"name":"voice-sessions","description":"Configure voice sessions in the server.","options":[{"type":3,"name":"create","description":"Name of the new voice session category."}]},{"type":1,"name":"voting-channels","description":"Configure voting channels in the server.","options":[{"type":7,"name":"add","description":"The channel you want to add as a voting channel.","channel_types":[0]},{"type":7,"name":"remove","description":"The channel you want to remove as a voting channel.","channel_types":[0]}]}]},{"type":1,"name":"donate","description":"See the ways you can contribute to support the Bastion bot project.","options":[]},{"type":1,"name":"emoji","description":"Command Group - emoji","options":[{"type":1,"name":"info","description":"Displays information on the specified custom emoji.","options":[{"type":3,"name":"emoji","description":"The emoji you want to display.","required":true}]}]},{"type":1,"name":"games","description":"Command Group - games","options":[{"type":1,"name":"8ball","description":"Ask any question to the magic 8 ball and get answers.","options":[{"type":3,"name":"question","description":"The question you want to ask the magic 8 ball.","required":true}]},{"type":1,"name":"flip","description":"Flip coins and see the result.","options":[{"type":4,"name":"coins","description":"The number of coins to flip.","min_value":1,"max_value":128}]},{"type":1,"name":"roll","description":"Roll dice and see the result. Supports dice notation.","options":[{"type":3,"name":"notation","description":"The dice notation."}]},{"type":1,"name":"rps","description":"Play rock paper scissor with Bastion.","options":[{"type":3,"name":"choice","description":"Your choice.","choices":[{"name":"Rock","value":"ROCK"},{"name":"Paper","value":"PAPER"},{"name":"Scissor","value":"SCISSOR"}],"required":true}]},{"type":1,"name":"russian-roulette","description":"Play a game of Russian roulette.","options":[{"type":4,"name":"rounds","description":"The number rounds you want to play.","min_value":1,"max_value":6}]}]},{"type":1,"name":"game-server","description":"Fetch information from nearly any game server that makes its status publicly available.","options":[{"type":3,"name":"game","description":"The game ID for the game server.","required":true},{"type":3,"name":"hostname","description":"The IP address or domain name of the game server.","required":true},{"type":4,"name":"port","description":"The connection port number of the game server. Use the query port if connection port doesn't work.","min_value":1,"max_value":65535}]},{"type":1,"name":"gamestats","description":"Command Group - gamestats","options":[{"type":1,"name":"aimlab","description":"Check stats of any Aim Lab player.","options":[{"type":3,"name":"username","description":"The username of the player.","required":true}]},{"type":1,"name":"apex","description":"Check stats of any Apex Legends player.","options":[{"type":3,"name":"username","description":"The username of the player.","required":true},{"type":3,"name":"platform","description":"The platform of the player.","choices":[{"name":"PC","value":"origin"},{"name":"PlayStation","value":"psn"},{"name":"Xbox","value":"xbl"}],"required":true}]},{"type":1,"name":"csgo","description":"Check stats of any Counter-Strike: Global Offensive player.","options":[{"type":3,"name":"username","description":"The username of the player.","required":true}]},{"type":1,"name":"fortnite","description":"Check stats of any Fortnite player.","options":[{"type":3,"name":"username","description":"The username of the player.","required":true},{"type":3,"name":"platform","description":"The platform of the player.","choices":[{"name":"PC","value":"kbm"},{"name":"Console","value":"gamepad"},{"name":"Mobile","value":"touch"}],"required":true}]},{"type":1,"name":"overwatch","description":"Check stats of any Overwatch 2 player.","options":[{"type":3,"name":"username","description":"The BattleTag or username of the player.","required":true},{"type":3,"name":"platform","description":"The platform of the player.","choices":[{"name":"PC","value":"pc"},{"name":"PlayStation","value":"psn"},{"name":"Xbox","value":"xbl"},{"name":"Nintendo Switch","value":"nintendo-switch"}]},{"type":3,"name":"region","description":"The region of the player.","choices":[{"name":"Americas","value":"us"},{"name":"Europe","value":"eu"},{"name":"Asia","value":"asia"}]}]},{"type":1,"name":"rainbow6","description":"Check stats of any Rainbow 6 player.","options":[{"type":3,"name":"username","description":"The username of the player.","required":true},{"type":3,"name":"platform","description":"The platform of the player.","choices":[{"name":"PC","value":"uplay"},{"name":"PlayStation","value":"psn"},{"name":"Xbox","value":"xbl"}],"required":true}]},{"type":1,"name":"valorant","description":"Check stats of any Valorant player.","options":[{"type":3,"name":"username","description":"The name tag of the player.","required":true},{"type":3,"name":"region","description":"The region of the account.","choices":[{"name":"Americas","value":"na"},{"name":"Europe","value":"eu"},{"name":"Asia-Pacific","value":"ap"},{"name":"Korea","value":"kr"}],"required":true}]}]},{"type":1,"name":"give","description":"Give Bastion Coins and Experience Points to server members or take it from them.","options":[{"type":6,"name":"user","description":"The user whose coins and XP will be updated.","required":true},{"type":4,"name":"coins","description":"The amount of coins you want to give or take.","required":true},{"type":4,"name":"xp","description":"The amount of XP you want to give or take.","required":true}]},{"type":1,"name":"giveaway","description":"Run giveaways in the server.","options":[{"type":3,"name":"title","description":"The title for the giveaway.","required":true},{"type":3,"name":"description","description":"The description for the giveaway."},{"type":4,"name":"winners","description":"The number of winners for the giveaway.","min_value":1,"max_value":9007199254740991},{"type":4,"name":"timer","description":"Number of hours the giveaway should run.","min_value":1,"max_value":720}]},{"type":1,"name":"iam","description":"Assign a self assignable role to yourself.","options":[{"type":8,"name":"role","description":"The role you want to assign yourself."}]},{"type":1,"name":"invite","description":"Generates an instant invite for the server.","options":[{"type":5,"name":"temporary","description":"Kick the members if they aren't assigned a role within 24 hours."}]},{"type":1,"name":"leaderboard","description":"Displays the server's leaderboard. You're ranked based on their level, XP, karma, and Bastion Coins.","options":[]},{"type":1,"name":"lmgtfy","description":"Send a LMGTFY link for the search query that teaches people how to do an internet search.","options":[{"type":3,"name":"query","description":"The search query.","required":true},{"type":3,"name":"site","description":"The search engine to use.","choices":[{"name":"DuckDuckGo","value":"d"},{"name":"Google","value":"g"},{"name":"Bing","value":"b"}]}]},{"type":1,"name":"message","description":"Command Group - message","options":[{"type":1,"name":"clear","description":"Clear recent messages (newer than two weeks) in the channel.","options":[{"type":4,"name":"limit","description":"Limit the numbers of messages that should be deleted.","min_value":1},{"type":5,"name":"bots","description":"Should it delete messages from bots."},{"type":5,"name":"pinned","description":"Should it delete messages that are pinned."},{"type":5,"name":"system","description":"Should it delete system messages."},{"type":6,"name":"user","description":"Only delete messages from this user."}]}]},{"type":1,"name":"music","description":"Command Group - music","options":[{"type":1,"name":"join","description":"Moves you to the voice channel where Bastion is currently connected.","options":[]},{"type":1,"name":"now","description":"Shows the song playing right now.","options":[]},{"type":1,"name":"pause","description":"Pause the music playback in the voice channel.","options":[]},{"type":1,"name":"play","description":"Play a specified song in the server.","options":[{"type":3,"name":"song","description":"The song name or link you want to play.","required":true}]},{"type":1,"name":"queue","description":"Displays the current music queue in the server.","options":[{"type":3,"name":"remove","description":"Remove songs matching the specified text from the music queue."},{"type":5,"name":"clear","description":"Remove all songs from the music queue."}]},{"type":1,"name":"resume","description":"Resume the music playback in the voice channel.","options":[]},{"type":1,"name":"shuffle","description":"Shuffle the current music queue.","options":[]},{"type":1,"name":"skip","description":"Skip the current music track that's being played in the voice channel.","options":[]},{"type":1,"name":"stop","description":"Stop the music playback and disconnect from the voice channel.","options":[]}]},{"type":1,"name":"poll","description":"Run polls in the server.","options":[{"type":3,"name":"question","description":"The question for the poll.","required":true},{"type":3,"name":"option1","description":"The 1st option for the poll's answer.","required":true},{"type":3,"name":"option2","description":"The 2nd option for the poll's answer.","required":true},{"type":3,"name":"option3","description":"The 3rd option for the poll's answer."},{"type":3,"name":"option4","description":"The 4th option for the poll's answer."},{"type":3,"name":"option5","description":"The 5th option for the poll's answer."},{"type":3,"name":"option6","description":"The 6th option for the poll's answer."},{"type":3,"name":"option7","description":"The 7th option for the poll's answer."},{"type":3,"name":"option8","description":"The 8th option for the poll's answer."},{"type":3,"name":"option9","description":"The 9th option for the poll's answer."},{"type":3,"name":"option10","description":"The 10th option for the poll's answer."},{"type":4,"name":"timer","description":"Number of hours the poll should run.","min_value":1,"max_value":720}]},{"type":1,"name":"profile","description":"Displays the Bastion profile of the specified user.","options":[{"type":6,"name":"user","description":"The user whose profile you want to display."}]},{"type":1,"name":"report","description":"Report a server member to the moderators of the server.","options":[{"type":6,"name":"user","description":"The user you want to report.","required":true},{"type":3,"name":"reason","description":"The reason you want to report the user.","required":true}]},{"type":1,"name":"role","description":"Command Group - role","options":[{"type":1,"name":"config","description":"Set the description & emoji of the specified role.","options":[{"type":8,"name":"role","description":"The role which you want to configure.","required":true},{"type":3,"name":"emoji","description":"The emoji you want to set as the role emoji."},{"type":3,"name":"description","description":"A description for the role (max 100 characters)."}]},{"type":1,"name":"create","description":"Create a new role in the server.","options":[{"type":3,"name":"name","description":"The name of the new role.","required":true},{"type":3,"name":"color","description":"The color for the new role (in HEX code)."},{"type":5,"name":"icon","description":"The icon for the new role (Image URL or Emoji)."},{"type":5,"name":"hoist","description":"Should the members be displayed separately from others."},{"type":5,"name":"mentionable","description":"Should the role be mentionable."},{"type":3,"name":"reason","description":"The reason for creating the role."}]},{"type":1,"name":"delete","description":"Delete the specified role.","options":[{"type":8,"name":"role","description":"The role you want to delete.","required":true},{"type":3,"name":"reason","description":"The reason for deleting the role."}]},{"type":1,"name":"info","description":"Displays information on the specified role.","options":[{"type":8,"name":"role","description":"The role whose information you want to display.","required":true}]},{"type":1,"name":"levels","description":"Configure level roles. When members reach a level, they get assigned to roles in the level.","options":[{"type":8,"name":"role","description":"The role that should be assigned to users."},{"type":4,"name":"level","description":"The level at which the role should be assigned.","min_value":0},{"type":4,"name":"remove","description":"The level which you want to remove.","min_value":0}]},{"type":1,"name":"update","description":"Update the specified role in the server.","options":[{"type":8,"name":"role","description":"The role you want to update.","required":true},{"type":3,"name":"name","description":"The new name for the role."},{"type":3,"name":"color","description":"The new color for the role (in HEX code)."},{"type":5,"name":"icon","description":"The new icon for the role (Image URL or Emoji)."},{"type":5,"name":"hoist","description":"Should the members be displayed separately from others."},{"type":5,"name":"mentionable","description":"Should the role be mentionable."},{"type":3,"name":"reason","description":"The reason for updating the role."}]}]},{"type":1,"name":"say","description":"Replies with the message you ask it to say.","options":[{"type":3,"name":"message","description":"The message you want Bastion to say.","required":true}]},{"type":1,"name":"search","description":"Command Group - search","options":[{"type":1,"name":"anime","description":"Searches for information on the specified anime.","options":[{"type":3,"name":"name","description":"The name of the anime.","required":true}]},{"type":1,"name":"apod","description":"Displays the astronomy picture of the day from NASA.","options":[]},{"type":1,"name":"cryptocurrency","description":"Searches for information on the specified crypto currency.","options":[{"type":3,"name":"symbol","description":"The symbol of the crypto currency.","required":true}]},{"type":1,"name":"definitions","description":"Displays the definitions for the specified word.","options":[{"type":3,"name":"word","description":"The word you want to lookup.","required":true}]},{"type":1,"name":"game","description":"Searches for information on the specified game.","options":[{"type":3,"name":"name","description":"The name of the game.","required":true}]},{"type":1,"name":"manga","description":"Searches for information on the specified manga.","options":[{"type":3,"name":"name","description":"The name of the manga.","required":true}]},{"type":1,"name":"movie","description":"Searches for information on the specified movie.","options":[{"type":3,"name":"name","description":"The name of the movie.","required":true}]},{"type":1,"name":"pokemon","description":"Searches for information on the specified pokémon.","options":[{"type":3,"name":"name","description":"The name (or number) of the Pokémon.","required":true}]},{"type":1,"name":"redirects","description":"Follows all the redirects in the specified URL and displays the final URL.","options":[{"type":3,"name":"url","description":"The URL you want to follow.","required":true}]},{"type":1,"name":"tv","description":"Searches for information on the specified TV show.","options":[{"type":3,"name":"name","description":"The name of the TV show.","required":true}]},{"type":1,"name":"urban-dictionary","description":"Searches Urban Dictionary for the specified word.","options":[{"type":3,"name":"word","description":"The word you want to lookup.","required":true}]},{"type":1,"name":"weather","description":"Displays the weather forcast of the specified location.","options":[{"type":3,"name":"location","description":"The location for the weather forcast.","required":true}]},{"type":1,"name":"wikipedia","description":"Searches Wikipedia for the specified query.","options":[{"type":3,"name":"query","description":"The search query.","required":true}]}]},{"type":1,"name":"server","description":"Command Group - server","options":[{"type":1,"name":"info","description":"Displays information on the server.","options":[]},{"type":1,"name":"prune","description":"Kicks the inactive members (without any roles) from the server.","options":[{"type":4,"name":"days","description":"The number of days of inactivity required for kicking.","min_value":1},{"type":8,"name":"role","description":"Inactive members check includes this role."},{"type":3,"name":"reason","description":"The reason for pruning the inactive members."}]}]},{"type":1,"name":"status","description":"Displays Bastion's status. You can also see Discord's status.","options":[{"type":5,"name":"shard","description":"Displays the status of the current shard."}]},{"type":1,"name":"su","description":"Command Group - su","options":[{"type":1,"name":"eval","description":"Evaluate JavaScript code in Bastion's context.","options":[{"type":3,"name":"code","description":"The code you want to execute.","required":true},{"type":5,"name":"public","description":"Display the output to everyone."}]},{"type":1,"name":"exec","description":"Execute terminal commands on the system where Bastion is running.","options":[{"type":3,"name":"command","description":"The command you want to execute.","required":true},{"type":5,"name":"public","description":"Display the output to everyone."}]},{"type":1,"name":"reload","description":"Reload Bastion's settings.","options":[]},{"type":1,"name":"shutdown","description":"Shutdown Bastion directly from Discord.","options":[]}]},{"type":1,"name":"suggest","description":"Send a suggestion to the server staff.","options":[{"type":3,"name":"suggestion","description":"What do you want to suggest?","required":true}]},{"type":1,"name":"thread","description":"Command Group - thread","options":[{"type":1,"name":"close","description":"Close and lock the thread.","options":[]},{"type":1,"name":"name","description":"Change the name of the thread.","options":[{"type":3,"name":"name","description":"The new name for the thread.","required":true}]}]},{"type":1,"name":"translate","description":"Translates the specified text from one language to another.","options":[{"type":3,"name":"text","description":"The text you want to translate.","required":true},{"type":3,"name":"to","description":"The language you want to translate to."},{"type":3,"name":"from","description":"The language you want to translate from."}]},{"type":1,"name":"user","description":"Command Group - user","options":[{"type":1,"name":"avatar","description":"Displays the avatar of the specified user.","options":[{"type":6,"name":"user","description":"The user whose avatar you want to display."}]},{"type":1,"name":"info","description":"Displays information on the specified user.","options":[{"type":6,"name":"user","description":"The user whose information you want to display."}]},{"type":1,"name":"infractions","description":"Configure infraction actions and displays infractions of the specified user.","options":[{"type":4,"name":"timeout","description":"Number of violations after which a user is timed out.","min_value":1},{"type":4,"name":"kick","description":"Number of violations after which a user is kicked.","min_value":1},{"type":4,"name":"ban","description":"Number of violations after which a user is banned.","min_value":1},{"type":6,"name":"user","description":"The user whose infractions you want to display."},{"type":4,"name":"remove","description":"The infraction you want to remove from the user.","min_value":1}]}]},{"type":1,"name":"warn","description":"Warn server members and add infractions to their server profile.","options":[{"type":6,"name":"user","description":"The user you want to warn.","required":true},{"type":3,"name":"reason","description":"The reason for the warning.","required":true}]}] \ No newline at end of file +[{"type":1,"name":"about","description":"Displays some basic information to help you get started with Bastion.","options":[]},{"type":1,"name":"calculate","description":"Evaluates the specified mathematical expression.","options":[{"type":3,"name":"expression","description":"The expression you want to evaluate.","required":true}]},{"type":1,"name":"changes","description":"See the changes introduced in the current version of Bastion.","options":[]},{"type":1,"name":"channel","description":"Command Group - channel","options":[{"type":1,"name":"create","description":"Create a new channel in the server.","options":[{"type":3,"name":"name","description":"The name of the new channel.","required":true},{"type":4,"name":"type","description":"The type of the new channel.","choices":[{"name":"Text","value":0},{"name":"Voice","value":2},{"name":"Announcement","value":5},{"name":"Stage","value":13},{"name":"Category","value":4}],"required":true},{"type":3,"name":"topic","description":"The topic for the new channel."},{"type":4,"name":"limit","description":"Limit the number of users for the new (voice) channel.","min_value":1,"max_value":99},{"type":4,"name":"slowmode","description":"Enable slowmode with the specified interval (in seconds).","min_value":0,"max_value":21600},{"type":5,"name":"nsfw","description":"Should the channel be NSFW."},{"type":3,"name":"reason","description":"The reason for creating the channel."}]},{"type":1,"name":"delete","description":"Delete the current (or the specified) channel.","options":[{"type":7,"name":"channel","description":"The channel you want to delete."},{"type":3,"name":"reason","description":"The reason for deleting the channel."}]},{"type":1,"name":"info","description":"Displays information on the current (or specified) channel.","options":[{"type":7,"name":"channel","description":"The channel whose information you want to display."}]},{"type":1,"name":"update","description":"Update the specified channel in the server.","options":[{"type":7,"name":"channel","description":"The channel you want to update."},{"type":3,"name":"name","description":"The new name for the channel."},{"type":3,"name":"topic","description":"The new topic for the channel."},{"type":4,"name":"limit","description":"The new limit of users for the (voice) channel.","min_value":1,"max_value":99},{"type":4,"name":"slowmode","description":"The new slowmode interval (in seconds).","min_value":0,"max_value":21600},{"type":5,"name":"nsfw","description":"Should the channel be NSFW."},{"type":3,"name":"reason","description":"The reason for updating the channel."}]}]},{"type":1,"name":"chat","description":"Ask questions or chat with ChatGPT from OpenAI.","options":[{"type":3,"name":"message","description":"Your message.","required":true}]},{"type":1,"name":"claim","description":"Claim any rewards available to you.","options":[]},{"type":1,"name":"comic","description":"Command Group - comic","options":[{"type":1,"name":"garfield","description":"Check the latest Garfield comic.","options":[]},{"type":1,"name":"phd","description":"Check the latest PHD comic, or the specified issue.","options":[{"type":4,"name":"issue","description":"Issue number to see the comic.","min_value":1}]},{"type":1,"name":"xkcd","description":"Check the latest xkcd comic, or the specified issue.","options":[{"type":4,"name":"issue","description":"Issue number to see the comic.","min_value":1}]}]},{"type":1,"name":"config","description":"Command Group - config","options":[{"type":1,"name":"auto-roles","description":"Configure roles that will be auto assigned to members when they join the server.","options":[{"type":8,"name":"role","description":"The role you want to add or remove as an auto role."},{"type":5,"name":"bots","description":"Whether this role should be auto assigned to bots."}]},{"type":1,"name":"auto-threads","description":"Configure auto threads in the server.","options":[]},{"type":1,"name":"farewell","description":"Configure farewell messages in the server.","options":[{"type":7,"name":"channel","description":"The channel where the farewell messages will be sent.","channel_types":[0]},{"type":3,"name":"message","description":"The custom farewell message."},{"type":4,"name":"timeout","description":"The interval after which the farewell message will be deleted.","min_value":1,"max_value":30}]},{"type":2,"name":"filter","description":"Subcommand Group - filter","options":[{"type":1,"name":"emails","description":"Configure Email Filter AutoMod rule in the server.","options":[]},{"type":1,"name":"invites","description":"Configure Invite Filter AutoMod rule in the server.","options":[]},{"type":1,"name":"links","description":"Configure Link Filter AutoMod rule in the server.","options":[]}]},{"type":1,"name":"gambling","description":"Configure gambling in the server.","options":[{"type":10,"name":"multiplier","description":"The reward multiplier."}]},{"type":1,"name":"gamification","description":"Configure gamification in the server.","options":[{"type":5,"name":"messages","description":"Should it show the level up messages."},{"type":7,"name":"channel","description":"The channel where the level up messages will be sent.","channel_types":[0]},{"type":10,"name":"multiplier","description":"The reward multiplier."}]},{"type":1,"name":"greeting","description":"Configure greeting messages in the server.","options":[{"type":7,"name":"channel","description":"The channel where the greeting messages will be sent.","channel_types":[0]},{"type":3,"name":"message","description":"The custom greeting message."},{"type":4,"name":"timeout","description":"The interval after which the greeting message will be deleted.","min_value":1,"max_value":30}]},{"type":1,"name":"live-streams","description":"Follow streamers and get notified in the specified channel when they go live.","options":[{"type":3,"name":"twitch","description":"The twitch channel you want to follow."},{"type":7,"name":"channel","description":"The channel where the notifications will be sent.","channel_types":[0]},{"type":3,"name":"message","description":"The custom message for notification."}]},{"type":2,"name":"logs","description":"Subcommand Group - logs","options":[{"type":1,"name":"content","description":"Configure whether deleted and edited message content should be shown in server logs.","options":[]},{"type":1,"name":"mod","description":"Configure channel for logging moderation events.","options":[{"type":7,"name":"channel","description":"The channel where moderation events will be logged.","channel_types":[0]}]},{"type":1,"name":"server","description":"Configure channel for logging server events.","options":[{"type":7,"name":"channel","description":"The channel where server events will be logged.","channel_types":[0]}]}]},{"type":1,"name":"music","description":"Configure music in the server.","options":[]},{"type":1,"name":"reports","description":"Configure user reports in the server.","options":[{"type":7,"name":"channel","description":"The channel where user reports will be sent.","channel_types":[0]}]},{"type":2,"name":"select-roles","description":"Subcommand Group - select-roles","options":[{"type":1,"name":"add","description":"Create a new Select Role Group.","options":[{"type":3,"name":"message","description":"The content of the Select Role Message for users.","required":true},{"type":7,"name":"channel","description":"The channel where you want to send the Select Role Message.","channel_types":[5,0,2]},{"type":4,"name":"type","description":"The behavior of the Select Role Group.","choices":[{"name":"Add Only","value":1},{"name":"Remove Only","value":2}]},{"type":4,"name":"ui","description":"The variant of Select Role UI.","choices":[{"name":"Buttons","value":0},{"name":"Select Menu","value":1}]},{"type":4,"name":"min","description":"The minimum number of roles users are allowed to select.","min_value":0,"max_value":25},{"type":4,"name":"max","description":"The maximum number of roles users are allowed to select.","min_value":1,"max_value":25}]},{"type":1,"name":"list","description":"List all the Select Role Groups.","options":[{"type":7,"name":"channel","description":"List Select Role Groups only from this channel.","channel_types":[5,0,2]}]},{"type":1,"name":"remove","description":"Remove the specified Select Role Group.","options":[{"type":3,"name":"id","description":"The Select Role Group ID.","required":true}]}]},{"type":1,"name":"self-roles","description":"Configure roles that users can assign to themselves.","options":[{"type":8,"name":"role","description":"The role you want to add or remove as a self role."}]},{"type":1,"name":"starboard","description":"Configure starboard in the server.","options":[{"type":7,"name":"channel","description":"The channel where starred messages will be logged.","channel_types":[0]},{"type":4,"name":"threshold","description":"The minimum number of stars a message needs.","min_value":2}]},{"type":1,"name":"streamer-role","description":"Set the role someone is assigned in the server when they start streaming.","options":[{"type":8,"name":"role","description":"The role that should be assigned to users."}]},{"type":1,"name":"suggestions","description":"Configure suggestions in the server.","options":[{"type":7,"name":"channel","description":"The channel where suggestions will be sent.","channel_types":[0]}]},{"type":1,"name":"triggers","description":"Configure triggers and responses in the server.","options":[{"type":3,"name":"add","description":"The pattern that will trigger the response."},{"type":3,"name":"remove","description":"The trigger that you want to remove."},{"type":3,"name":"message","description":"The message response for the trigger."},{"type":3,"name":"emoji","description":"The reaction emoji response for the trigger."}]},{"type":1,"name":"verification","description":"Configure verification in the server.","options":[{"type":8,"name":"role","description":"The role users are assigned when are verified."},{"type":3,"name":"text","description":"Type a text message that will be shown to the users trying to verify."}]},{"type":1,"name":"voice-sessions","description":"Configure voice sessions in the server.","options":[{"type":3,"name":"create","description":"Name of the new voice session category."}]},{"type":1,"name":"voting-channels","description":"Configure voting channels in the server.","options":[{"type":7,"name":"add","description":"The channel you want to add as a voting channel.","channel_types":[0]},{"type":7,"name":"remove","description":"The channel you want to remove as a voting channel.","channel_types":[0]}]}]},{"type":1,"name":"donate","description":"See the ways you can contribute to support the Bastion bot project.","options":[]},{"type":1,"name":"emoji","description":"Command Group - emoji","options":[{"type":1,"name":"info","description":"Displays information on the specified custom emoji.","options":[{"type":3,"name":"emoji","description":"The emoji you want to display.","required":true}]}]},{"type":1,"name":"games","description":"Command Group - games","options":[{"type":1,"name":"8ball","description":"Ask any question to the magic 8 ball and get answers.","options":[{"type":3,"name":"question","description":"The question you want to ask the magic 8 ball.","required":true}]},{"type":1,"name":"flip","description":"Flip coins and see the result.","options":[{"type":4,"name":"coins","description":"The number of coins to flip.","min_value":1,"max_value":128}]},{"type":1,"name":"roll","description":"Roll dice and see the result. Supports dice notation.","options":[{"type":3,"name":"notation","description":"The dice notation."}]},{"type":1,"name":"rps","description":"Play rock paper scissor with Bastion.","options":[{"type":3,"name":"choice","description":"Your choice.","choices":[{"name":"Rock","value":"ROCK"},{"name":"Paper","value":"PAPER"},{"name":"Scissor","value":"SCISSOR"}],"required":true}]},{"type":1,"name":"russian-roulette","description":"Play a game of Russian roulette.","options":[{"type":4,"name":"rounds","description":"The number rounds you want to play.","min_value":1,"max_value":6}]}]},{"type":1,"name":"game-server","description":"Fetch information from nearly any game server that makes its status publicly available.","options":[{"type":3,"name":"game","description":"The game ID for the game server.","required":true},{"type":3,"name":"hostname","description":"The IP address or domain name of the game server.","required":true},{"type":4,"name":"port","description":"The connection port number of the game server. Use the query port if connection port doesn't work.","min_value":1,"max_value":65535}]},{"type":1,"name":"gamestats","description":"Command Group - gamestats","options":[{"type":1,"name":"aimlab","description":"Check stats of any Aim Lab player.","options":[{"type":3,"name":"username","description":"The username of the player.","required":true}]},{"type":1,"name":"apex","description":"Check stats of any Apex Legends player.","options":[{"type":3,"name":"username","description":"The username of the player.","required":true},{"type":3,"name":"platform","description":"The platform of the player.","choices":[{"name":"PC","value":"origin"},{"name":"PlayStation","value":"psn"},{"name":"Xbox","value":"xbl"}],"required":true}]},{"type":1,"name":"csgo","description":"Check stats of any Counter-Strike: Global Offensive player.","options":[{"type":3,"name":"username","description":"The username of the player.","required":true}]},{"type":1,"name":"fortnite","description":"Check stats of any Fortnite player.","options":[{"type":3,"name":"username","description":"The username of the player.","required":true},{"type":3,"name":"platform","description":"The platform of the player.","choices":[{"name":"PC","value":"kbm"},{"name":"Console","value":"gamepad"},{"name":"Mobile","value":"touch"}],"required":true}]},{"type":1,"name":"overwatch","description":"Check stats of any Overwatch 2 player.","options":[{"type":3,"name":"username","description":"The BattleTag or username of the player.","required":true},{"type":3,"name":"platform","description":"The platform of the player.","choices":[{"name":"PC","value":"pc"},{"name":"PlayStation","value":"psn"},{"name":"Xbox","value":"xbl"},{"name":"Nintendo Switch","value":"nintendo-switch"}]},{"type":3,"name":"region","description":"The region of the player.","choices":[{"name":"Americas","value":"us"},{"name":"Europe","value":"eu"},{"name":"Asia","value":"asia"}]}]},{"type":1,"name":"rainbow6","description":"Check stats of any Rainbow 6 player.","options":[{"type":3,"name":"username","description":"The username of the player.","required":true},{"type":3,"name":"platform","description":"The platform of the player.","choices":[{"name":"PC","value":"uplay"},{"name":"PlayStation","value":"psn"},{"name":"Xbox","value":"xbl"}],"required":true}]},{"type":1,"name":"valorant","description":"Check stats of any Valorant player.","options":[{"type":3,"name":"username","description":"The name tag of the player.","required":true},{"type":3,"name":"region","description":"The region of the account.","choices":[{"name":"Americas","value":"na"},{"name":"Europe","value":"eu"},{"name":"Asia-Pacific","value":"ap"},{"name":"Korea","value":"kr"}],"required":true}]}]},{"type":1,"name":"give","description":"Give Bastion Coins and Experience Points to server members or take it from them.","options":[{"type":6,"name":"user","description":"The user whose coins and XP will be updated.","required":true},{"type":4,"name":"coins","description":"The amount of coins you want to give or take.","required":true},{"type":4,"name":"xp","description":"The amount of XP you want to give or take.","required":true}]},{"type":1,"name":"giveaway","description":"Run giveaways in the server.","options":[{"type":3,"name":"title","description":"The title for the giveaway.","required":true},{"type":3,"name":"description","description":"The description for the giveaway."},{"type":4,"name":"winners","description":"The number of winners for the giveaway.","min_value":1,"max_value":9007199254740991},{"type":4,"name":"timer","description":"Number of hours the giveaway should run.","min_value":1,"max_value":720}]},{"type":1,"name":"iam","description":"Assign a self assignable role to yourself.","options":[{"type":8,"name":"role","description":"The role you want to assign yourself."}]},{"type":1,"name":"image","description":"Command Group - image","options":[{"type":1,"name":"generate","description":"Generate an image with DALL-E from OpenAI.","options":[{"type":3,"name":"prompt","description":"A description of the desired image.","required":true},{"type":3,"name":"size","description":"The size of the generated image.","choices":[{"name":"Square","value":"1024x1024"},{"name":"Portrait","value":"1024x1792"},{"name":"Landscape","value":"1792x1024"}]}]}]},{"type":1,"name":"invite","description":"Generates an instant invite for the server.","options":[{"type":5,"name":"temporary","description":"Kick the members if they aren't assigned a role within 24 hours."}]},{"type":1,"name":"leaderboard","description":"Displays the server's leaderboard. You're ranked based on their level, XP, karma, and Bastion Coins.","options":[]},{"type":1,"name":"lmgtfy","description":"Send a LMGTFY link for the search query that teaches people how to do an internet search.","options":[{"type":3,"name":"query","description":"The search query.","required":true},{"type":3,"name":"site","description":"The search engine to use.","choices":[{"name":"DuckDuckGo","value":"d"},{"name":"Google","value":"g"},{"name":"Bing","value":"b"}]}]},{"type":1,"name":"message","description":"Command Group - message","options":[{"type":1,"name":"clear","description":"Clear recent messages (newer than two weeks) in the channel.","options":[{"type":4,"name":"limit","description":"Limit the numbers of messages that should be deleted.","min_value":1},{"type":5,"name":"bots","description":"Should it delete messages from bots."},{"type":5,"name":"pinned","description":"Should it delete messages that are pinned."},{"type":5,"name":"system","description":"Should it delete system messages."},{"type":6,"name":"user","description":"Only delete messages from this user."}]}]},{"type":1,"name":"music","description":"Command Group - music","options":[{"type":1,"name":"join","description":"Moves you to the voice channel where Bastion is currently connected.","options":[]},{"type":1,"name":"now","description":"Shows the song playing right now.","options":[]},{"type":1,"name":"pause","description":"Pause the music playback in the voice channel.","options":[]},{"type":1,"name":"play","description":"Play a specified song in the server.","options":[{"type":3,"name":"song","description":"The song name or link you want to play.","required":true}]},{"type":1,"name":"queue","description":"Displays the current music queue in the server.","options":[{"type":3,"name":"remove","description":"Remove songs matching the specified text from the music queue."},{"type":5,"name":"clear","description":"Remove all songs from the music queue."}]},{"type":1,"name":"resume","description":"Resume the music playback in the voice channel.","options":[]},{"type":1,"name":"shuffle","description":"Shuffle the current music queue.","options":[]},{"type":1,"name":"skip","description":"Skip the current music track that's being played in the voice channel.","options":[]},{"type":1,"name":"stop","description":"Stop the music playback and disconnect from the voice channel.","options":[]}]},{"type":1,"name":"poll","description":"Run polls in the server.","options":[{"type":3,"name":"question","description":"The question for the poll.","required":true},{"type":3,"name":"option1","description":"The 1st option for the poll's answer.","required":true},{"type":3,"name":"option2","description":"The 2nd option for the poll's answer.","required":true},{"type":3,"name":"option3","description":"The 3rd option for the poll's answer."},{"type":3,"name":"option4","description":"The 4th option for the poll's answer."},{"type":3,"name":"option5","description":"The 5th option for the poll's answer."},{"type":3,"name":"option6","description":"The 6th option for the poll's answer."},{"type":3,"name":"option7","description":"The 7th option for the poll's answer."},{"type":3,"name":"option8","description":"The 8th option for the poll's answer."},{"type":3,"name":"option9","description":"The 9th option for the poll's answer."},{"type":3,"name":"option10","description":"The 10th option for the poll's answer."},{"type":4,"name":"timer","description":"Number of hours the poll should run.","min_value":1,"max_value":720}]},{"type":1,"name":"profile","description":"Displays the Bastion profile of the specified user.","options":[{"type":6,"name":"user","description":"The user whose profile you want to display."}]},{"type":1,"name":"report","description":"Report a server member to the moderators of the server.","options":[{"type":6,"name":"user","description":"The user you want to report.","required":true},{"type":3,"name":"reason","description":"The reason you want to report the user.","required":true}]},{"type":1,"name":"role","description":"Command Group - role","options":[{"type":1,"name":"config","description":"Set the description & emoji of the specified role.","options":[{"type":8,"name":"role","description":"The role which you want to configure.","required":true},{"type":3,"name":"emoji","description":"The emoji you want to set as the role emoji."},{"type":3,"name":"description","description":"A description for the role (max 100 characters)."}]},{"type":1,"name":"create","description":"Create a new role in the server.","options":[{"type":3,"name":"name","description":"The name of the new role.","required":true},{"type":3,"name":"color","description":"The color for the new role (in HEX code)."},{"type":5,"name":"icon","description":"The icon for the new role (Image URL or Emoji)."},{"type":5,"name":"hoist","description":"Should the members be displayed separately from others."},{"type":5,"name":"mentionable","description":"Should the role be mentionable."},{"type":3,"name":"reason","description":"The reason for creating the role."}]},{"type":1,"name":"delete","description":"Delete the specified role.","options":[{"type":8,"name":"role","description":"The role you want to delete.","required":true},{"type":3,"name":"reason","description":"The reason for deleting the role."}]},{"type":1,"name":"info","description":"Displays information on the specified role.","options":[{"type":8,"name":"role","description":"The role whose information you want to display.","required":true}]},{"type":1,"name":"levels","description":"Configure level roles. When members reach a level, they get assigned to roles in the level.","options":[{"type":8,"name":"role","description":"The role that should be assigned to users."},{"type":4,"name":"level","description":"The level at which the role should be assigned.","min_value":0},{"type":4,"name":"remove","description":"The level which you want to remove.","min_value":0}]},{"type":1,"name":"update","description":"Update the specified role in the server.","options":[{"type":8,"name":"role","description":"The role you want to update.","required":true},{"type":3,"name":"name","description":"The new name for the role."},{"type":3,"name":"color","description":"The new color for the role (in HEX code)."},{"type":5,"name":"icon","description":"The new icon for the role (Image URL or Emoji)."},{"type":5,"name":"hoist","description":"Should the members be displayed separately from others."},{"type":5,"name":"mentionable","description":"Should the role be mentionable."},{"type":3,"name":"reason","description":"The reason for updating the role."}]}]},{"type":1,"name":"say","description":"Replies with the message you ask it to say.","options":[{"type":3,"name":"message","description":"The message you want Bastion to say.","required":true}]},{"type":1,"name":"search","description":"Command Group - search","options":[{"type":1,"name":"anime","description":"Searches for information on the specified anime.","options":[{"type":3,"name":"name","description":"The name of the anime.","required":true}]},{"type":1,"name":"apod","description":"Displays the astronomy picture of the day from NASA.","options":[]},{"type":1,"name":"cryptocurrency","description":"Searches for information on the specified crypto currency.","options":[{"type":3,"name":"symbol","description":"The symbol of the crypto currency.","required":true}]},{"type":1,"name":"definitions","description":"Displays the definitions for the specified word.","options":[{"type":3,"name":"word","description":"The word you want to lookup.","required":true}]},{"type":1,"name":"game","description":"Searches for information on the specified game.","options":[{"type":3,"name":"name","description":"The name of the game.","required":true}]},{"type":1,"name":"manga","description":"Searches for information on the specified manga.","options":[{"type":3,"name":"name","description":"The name of the manga.","required":true}]},{"type":1,"name":"movie","description":"Searches for information on the specified movie.","options":[{"type":3,"name":"name","description":"The name of the movie.","required":true}]},{"type":1,"name":"pokemon","description":"Searches for information on the specified pokémon.","options":[{"type":3,"name":"name","description":"The name (or number) of the Pokémon.","required":true}]},{"type":1,"name":"redirects","description":"Follows all the redirects in the specified URL and displays the final URL.","options":[{"type":3,"name":"url","description":"The URL you want to follow.","required":true}]},{"type":1,"name":"tv","description":"Searches for information on the specified TV show.","options":[{"type":3,"name":"name","description":"The name of the TV show.","required":true}]},{"type":1,"name":"urban-dictionary","description":"Searches Urban Dictionary for the specified word.","options":[{"type":3,"name":"word","description":"The word you want to lookup.","required":true}]},{"type":1,"name":"weather","description":"Displays the weather forcast of the specified location.","options":[{"type":3,"name":"location","description":"The location for the weather forcast.","required":true}]},{"type":1,"name":"wikipedia","description":"Searches Wikipedia for the specified query.","options":[{"type":3,"name":"query","description":"The search query.","required":true}]}]},{"type":1,"name":"server","description":"Command Group - server","options":[{"type":1,"name":"info","description":"Displays information on the server.","options":[]},{"type":1,"name":"prune","description":"Kicks the inactive members (without any roles) from the server.","options":[{"type":4,"name":"days","description":"The number of days of inactivity required for kicking.","min_value":1},{"type":8,"name":"role","description":"Inactive members check includes this role."},{"type":3,"name":"reason","description":"The reason for pruning the inactive members."}]}]},{"type":1,"name":"status","description":"Displays Bastion's status. You can also see Discord's status.","options":[{"type":5,"name":"shard","description":"Displays the status of the current shard."}]},{"type":1,"name":"su","description":"Command Group - su","options":[{"type":1,"name":"eval","description":"Evaluate JavaScript code in Bastion's context.","options":[{"type":3,"name":"code","description":"The code you want to execute.","required":true},{"type":5,"name":"public","description":"Display the output to everyone."}]},{"type":1,"name":"exec","description":"Execute terminal commands on the system where Bastion is running.","options":[{"type":3,"name":"command","description":"The command you want to execute.","required":true},{"type":5,"name":"public","description":"Display the output to everyone."}]},{"type":1,"name":"reload","description":"Reload Bastion's settings.","options":[]},{"type":1,"name":"shutdown","description":"Shutdown Bastion directly from Discord.","options":[]}]},{"type":1,"name":"suggest","description":"Send a suggestion to the server staff.","options":[{"type":3,"name":"suggestion","description":"What do you want to suggest?","required":true}]},{"type":1,"name":"thread","description":"Command Group - thread","options":[{"type":1,"name":"close","description":"Close and lock the thread.","options":[]},{"type":1,"name":"name","description":"Change the name of the thread.","options":[{"type":3,"name":"name","description":"The new name for the thread.","required":true}]}]},{"type":1,"name":"translate","description":"Translates the specified text from one language to another.","options":[{"type":3,"name":"text","description":"The text you want to translate.","required":true},{"type":3,"name":"to","description":"The language you want to translate to."},{"type":3,"name":"from","description":"The language you want to translate from."}]},{"type":1,"name":"user","description":"Command Group - user","options":[{"type":1,"name":"avatar","description":"Displays the avatar of the specified user.","options":[{"type":6,"name":"user","description":"The user whose avatar you want to display."}]},{"type":1,"name":"info","description":"Displays information on the specified user.","options":[{"type":6,"name":"user","description":"The user whose information you want to display."}]},{"type":1,"name":"infractions","description":"Configure infraction actions and displays infractions of the specified user.","options":[{"type":4,"name":"timeout","description":"Number of violations after which a user is timed out.","min_value":1},{"type":4,"name":"kick","description":"Number of violations after which a user is kicked.","min_value":1},{"type":4,"name":"ban","description":"Number of violations after which a user is banned.","min_value":1},{"type":6,"name":"user","description":"The user whose infractions you want to display."},{"type":4,"name":"remove","description":"The infraction you want to remove from the user.","min_value":1}]}]},{"type":1,"name":"warn","description":"Warn server members and add infractions to their server profile.","options":[{"type":6,"name":"user","description":"The user you want to warn.","required":true},{"type":3,"name":"reason","description":"The reason for the warning.","required":true}]}] \ No newline at end of file From ecb5ff28ba73c3d8d137f935a5d7bf404297972d Mon Sep 17 00:00:00 2001 From: TRACTION <19631364+iamtraction@users.noreply.github.com> Date: Sun, 3 Dec 2023 05:24:32 +0530 Subject: [PATCH 10/11] version: 10.14.0 Signed-off-by: TRACTION <19631364+iamtraction@users.noreply.github.com> --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index daace453e..cef26bd99 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "bastion", - "version": "10.13.1", + "version": "10.14.0", "description": "Get an enhanced Discord experience!", "type": "module", "homepage": "https://bastion.traction.one", From 8b149a4f6ead7ee4bd2e5a4678b1e6f70b11ae1c Mon Sep 17 00:00:00 2001 From: TRACTION <19631364+iamtraction@users.noreply.github.com> Date: Sun, 3 Dec 2023 06:00:04 +0530 Subject: [PATCH 11/11] deps: update Signed-off-by: TRACTION <19631364+iamtraction@users.noreply.github.com> --- package.json | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/package.json b/package.json index cef26bd99..6e5c539aa 100644 --- a/package.json +++ b/package.json @@ -22,12 +22,12 @@ "@types/express": "^4.17.21", "@types/gamedig": "^4.0.5", "@types/http-errors": "^2.0.4", - "@types/jsdom": "^21.1.5", - "@types/node": "^20.9.2", - "@typescript-eslint/eslint-plugin": "^6.11.0", - "@typescript-eslint/parser": "^6.11.0", - "eslint": "^8.54.0", - "typescript": "^5.2.2" + "@types/jsdom": "^21.1.6", + "@types/node": "^20.10.2", + "@typescript-eslint/eslint-plugin": "^6.13.1", + "@typescript-eslint/parser": "^6.13.1", + "eslint": "^8.55.0", + "typescript": "^5.3.2" }, "dependencies": { "@bastion/tesseract": "^5.1.0", @@ -36,14 +36,14 @@ "discord-rpc": "^4.0.1", "dotenv": "^16.3.1", "emoji-regex": "^10.3.0", - "gamedig": "^4.1.0", - "jsdom": "^22.1.0", + "gamedig": "^4.2.0", + "jsdom": "^23.0.1", "libsodium-wrappers": "^0.7.13", "mathjs": "^12.1.0", "openai": "^4.20.1", "play-dl": "^1.9.7", "r6api.js": "^4.4.1", - "undici": "^5.27.2", + "undici": "^5.28.2", "ytdl-core": "^4.11.5", "ytpl": "^2.3.0" },