Skip to content

Commit

Permalink
Fix Account add validation
Browse files Browse the repository at this point in the history
  • Loading branch information
KwikKill committed Sep 14, 2024
1 parent 4ff1d2b commit 89c7964
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions commands/lol.js
Original file line number Diff line number Diff line change
Expand Up @@ -906,6 +906,11 @@ module.exports = {
const gamename = interaction.options.getString("gamename");
const tagline = interaction.options.getString("tagline");

// Check if the gamename and tagline are valid
if ((gamename && gamename.includes("#")) || (tagline && tagline.includes("#"))) {
return await interaction.editReply("Gamename and tagline should not contain '#', please use the format `gamename#tagline` without providing the #");
}

const region = interaction.options.getString("region");
const champion = interaction.options.getString("champion");
const role = interaction.options.getString("lane");
Expand Down
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const { Client, Collection, GatewayIntentBits,PermissionsBitField, Partials, ChannelType } = require('discord.js');
const { Client, Collection, GatewayIntentBits, Partials, ChannelType } = require('discord.js');
const config = require('./config.json');
const fs = require("fs");
const lol = require("./util/lol_functions.js");
Expand Down

0 comments on commit 89c7964

Please sign in to comment.