Skip to content

Commit

Permalink
🪄 Added OpenAI on/off detection.
Browse files Browse the repository at this point in the history
  • Loading branch information
Maseshi committed Aug 19, 2023
1 parent 6a2c401 commit 993fd55
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions source/commands/me/ask.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ module.exports.function.command = {
async execute(interaction) {
const inputMessages = interaction.options.getString("messages");

if (!interaction.client.ai) return interaction.reply(interaction.client.translate.commands.ask.has_been_disabled);

await interaction.deferReply();

try {
Expand Down
2 changes: 2 additions & 0 deletions source/commands/tools/generate.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,8 @@ module.exports.function.command = {
const inputNumber = interaction.options.getInteger("number") ?? 1;
const inputSize = interaction.options.getString("size") ?? "1024x1024";

if (!interaction.client.ai) return interaction.reply(interaction.client.translate.commands.generate.has_been_disabled);

switch (subCommand) {
case "images": {
await interaction.reply(interaction.client.translate.commands.generate.generating_images);
Expand Down

0 comments on commit 993fd55

Please sign in to comment.