Skip to content

Commit

Permalink
- Fixed vote issue
Browse files Browse the repository at this point in the history
  • Loading branch information
appujet committed Jul 30, 2024
1 parent 91e4c30 commit c6ada3d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/commands/config/Language.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export default class LanguageCommand extends Command {
name: "language",
description: {
content: "cmd.language.description",
examples: ["language set en", "language reset"],
examples: ["language set \`EnglishUS\`", "language reset"],
usage: "language",
},
category: "general",
Expand Down
2 changes: 1 addition & 1 deletion src/events/client/InteractionCreate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ export default class InteractionCreate extends Event {
if (!isDev) return;
}
}
if (command.vote) {
if (command.vote && this.client.config.topGG) {
const voted = await this.client.topGG.hasVoted(interaction.user.id);
if (!voted) {
const voteBtn = new ActionRowBuilder<ButtonBuilder>().addComponents(
Expand Down
2 changes: 1 addition & 1 deletion src/events/client/MessageCreate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ export default class MessageCreate extends Event {
if (!isDev) return;
}
}
if (command.vote) {
if (command.vote && this.client.config.topGG) {
const voted = await this.client.topGG.hasVoted(message.author.id);
if (!voted) {
const voteBtn = new ActionRowBuilder<ButtonBuilder>().addComponents(
Expand Down

0 comments on commit c6ada3d

Please sign in to comment.