Skip to content
This repository has been archived by the owner on Nov 11, 2024. It is now read-only.

Commit

Permalink
chore(config): re-apply string infusion to make it consistent for all…
Browse files Browse the repository at this point in the history
… entire projects
  • Loading branch information
noxzym committed Jul 25, 2022
1 parent ba86064 commit 6ebc0d1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions .env_example
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ LOCALE=""
#==============================================================================
# OPTIONAL, MULTIPLE - Activity list, what text should be appear on your bot's status?
# Example: ACTIVITIES="Hello!"
# Formats: {prefix} = bot prefix, {userCount} = user amount, {textChannelsCount} = text channel amount, {serverCount} = server amount, {playingCount} = amount of server playing music using the bot, {username} = bot username
ACTIVITIES="My default prefix is {prefix}, music with {userCount} users, {textChannelsCount} text channels in {serverCount} guilds, 'Hello there, my name is {username}'"
# Formats: {prefix} = bot prefix, {userCount} = user amount, {textChannelCount} = text channel amount, {serverCount} = server amount, {playingCount} = amount of server playing music using the bot, {username} = bot username
ACTIVITIES="My default prefix is {prefix}, music with {userCount} users, {textChannelCount} text channels in {serverCount} guilds, 'Hello there, my name is {username}'"

#==============================================================================
# OPTIONAL, MULTIPLE - Activity type list.
Expand Down
10 changes: 5 additions & 5 deletions src/events/ReadyEvent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export class ReadyEvent extends BaseEvent {
this.client.logger.info(
await this.formatString(
"{username} is ready to serve {userCount} users on {serverCount} guilds in " +
"{textChannels.size} text channels and {voiceChannels.size} voice channels!"
"{textChannelCount} text channels and {voiceChannelCount} voice channels!"
)
);
}
Expand All @@ -27,15 +27,15 @@ export class ReadyEvent extends BaseEvent {

newText = newText.replace(/{userCount}/g, users.toString());
}
if (text.includes("{textChannels.size}")) {
if (text.includes("{textChannelCount}")) {
const textChannels = await this.client.utils.getChannelCount(true);

newText = newText.replace(/{textChannels.size}/g, textChannels.toString());
newText = newText.replace(/{textChannelCount}/g, textChannels.toString());
}
if (text.includes("{voiceChannels.size}")) {
if (text.includes("{voiceChannelCount}")) {
const voiceChannels = await this.client.utils.getChannelCount(false, true);

newText = newText.replace(/{voiceChannels.size}/g, voiceChannels.toString());
newText = newText.replace(/{voiceChannelCount}/g, voiceChannels.toString());
}
if (text.includes("{serverCount}")) {
const guilds = await this.client.utils.getGuildCount();
Expand Down

0 comments on commit 6ebc0d1

Please sign in to comment.