Skip to content

Commit

Permalink
Cord format
Browse files Browse the repository at this point in the history
  • Loading branch information
hwangsihu committed Jul 7, 2024
1 parent 837b437 commit 06b391b
Show file tree
Hide file tree
Showing 13 changed files with 32 additions and 14 deletions.
8 changes: 7 additions & 1 deletion src/commands/config/247.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,13 @@ export default class _247 extends Command {
);
}
return await ctx.sendMessage({
embeds: [embed.setDescription("**24/7 mode has been enabled. The bot will not leave the voice channel even if there are no people in the voice channel.**").setColor(client.color.main)],
embeds: [
embed
.setDescription(
"**24/7 mode has been enabled. The bot will not leave the voice channel even if there are no people in the voice channel.**",
)
.setColor(client.color.main),
],
});
} catch (error) {
console.error("Error in 247 command:", error);
Expand Down
5 changes: 3 additions & 2 deletions src/commands/config/Setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,8 @@ export default class Setup extends Command {
await ctx.sendMessage({
embeds: [
{
description: "The song request channel has been deleted. If the channel is not deleted normally, please delete it yourself.",
description:
"The song request channel has been deleted. If the channel is not deleted normally, please delete it yourself.",
color: client.color.main,
},
],
Expand All @@ -149,7 +150,7 @@ export default class Setup extends Command {
const channel = ctx.guild.channels.cache.get(data3.textId);
if (channel) {
embed.setDescription(`The song request channel is <#${channel.id}>.`);
await ctx.sendMessage({embeds: [embed]});
await ctx.sendMessage({ embeds: [embed] });
} else {
await ctx.sendMessage({
embeds: [
Expand Down
2 changes: 1 addition & 1 deletion src/commands/filters/NightCore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export default class NightCore extends Command {
],
});
} else {
player.player.setTimescale({speed: 1.2, pitch: 1.2, rate: 1.0});
player.player.setTimescale({ speed: 1.2, pitch: 1.2, rate: 1.0 });
player.filters.push("nightcore");
ctx.sendMessage({
embeds: [
Expand Down
2 changes: 1 addition & 1 deletion src/commands/filters/Pitch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export default class Pitch extends Command {
],
});
}
player.player.setTimescale({pitch: number});
player.player.setTimescale({ pitch: number });
return await ctx.sendMessage({
embeds: [
{
Expand Down
2 changes: 1 addition & 1 deletion src/commands/filters/Speed.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export default class Speed extends Command {
],
});
}
player.player.setTimescale({speed});
player.player.setTimescale({ speed });
return await ctx.sendMessage({
embeds: [
{
Expand Down
2 changes: 1 addition & 1 deletion src/commands/info/Botinfo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export default class Botinfo extends Command {
const osUptime = client.utils.formatTime(os.uptime());
const osHostname = os.hostname();
const cpuInfo = `${os.arch()} (${os.cpus().length} cores)`;
const cpuUsed = (await usagePercent({coreIndex: 0, sampleMs: 2000})).percent;
const cpuUsed = (await usagePercent({ coreIndex: 0, sampleMs: 2000 })).percent;
const memTotal = showTotalMemory(true);
const memUsed = (process.memoryUsage().rss / 1024 ** 2).toFixed(2);
const nodeVersion = process.version;
Expand Down
2 changes: 1 addition & 1 deletion src/commands/info/Ping.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export default class Ping extends Command {
const msg = await ctx.sendDeferMessage("Pinging...");
const embed = this.client
.embed()
.setAuthor({name: "Pong", iconURL: this.client.user.displayAvatarURL()})
.setAuthor({ name: "Pong", iconURL: this.client.user.displayAvatarURL() })
.setColor(this.client.color.main)
.addFields([
{
Expand Down
2 changes: 1 addition & 1 deletion src/commands/music/Nowplaying.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export default class Nowplaying extends Command {
const embed = this.client
.embed()
.setColor(this.client.color.main)
.setAuthor({name: "Now Playing", iconURL: ctx.guild.iconURL({})})
.setAuthor({ name: "Now Playing", iconURL: ctx.guild.iconURL({}) })
.setThumbnail(track.info.artworkUrl)
.setDescription(`[${track.info.title}](${track.info.uri}) - Request By: ${track.info.requester}\n\n\`${bar}\``)
.addFields({
Expand Down
6 changes: 5 additions & 1 deletion src/commands/music/Seek.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,11 @@ export default class Seek extends Command {
}
if (duration > current.length) {
return await ctx.sendMessage({
embeds: [embed.setColor(this.client.color.red).setDescription(`Cannot seek beyond the song duration of ${client.utils.formatTime(current.length)}.`)],
embeds: [
embed
.setColor(this.client.color.red)
.setDescription(`Cannot seek beyond the song duration of ${client.utils.formatTime(current.length)}.`),
],
});
}
player.seek(duration);
Expand Down
4 changes: 3 additions & 1 deletion src/commands/music/Volume.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,9 @@ export default class Volume extends Command {
let description = "";
if (isNaN(number)) description = "Please provide a valid number.";
else if (number < 0) description = "The volume can't be lower than 0.";
else if (number > 200) description = "The volume can't be higher than 200. Do you want to damage your hearing or speakers? Hmmm, I don't think that's such a good idea.";
else if (number > 200)
description =
"The volume can't be higher than 200. Do you want to damage your hearing or speakers? Hmmm, I don't think that's such a good idea.";
return await ctx.sendMessage({
embeds: [embed.setColor(this.client.color.red).setDescription(description)],
});
Expand Down
5 changes: 4 additions & 1 deletion src/commands/playlist/Add.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,10 @@ export default class AddPlaylist extends Command {
}
const playlistData = await client.db.getPlaylist(ctx.author.id, playlist);
if (!playlistData) {
const playlistNotFoundError = this.client.embed().setDescription("That playlist doesn't exist.").setColor(this.client.color.red);
const playlistNotFoundError = this.client
.embed()
.setDescription("That playlist doesn't exist.")
.setColor(this.client.color.red);
return await ctx.sendMessage({ embeds: [playlistNotFoundError] });
}
const res = await client.queue.search(song);
Expand Down
4 changes: 3 additions & 1 deletion src/events/client/GuildCreate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,9 @@ export default class GuildCreate extends Event {
}
const channel = (await this.client.channels.fetch(logChannelId)) as TextChannel;
if (!channel) {
console.error(`Log channel not found with ID ${logChannelId}. Please change the settings in .env or, if you have a channel, invite me to that guild.`);
console.error(
`Log channel not found with ID ${logChannelId}. Please change the settings in .env or, if you have a channel, invite me to that guild.`,
);
return;
}
try {
Expand Down
2 changes: 1 addition & 1 deletion src/events/client/VoiceStateUpdate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export default class VoiceStateUpdate extends Event {
newState.guild.members.me.permissions.has(["Connect", "Speak"]) ||
newState.channel.permissionsFor(newState.guild.members.me).has("MuteMembers")
) {
await newState.guild.members.me.voice.setSuppressed(false).catch(() => { });
await newState.guild.members.me.voice.setSuppressed(false).catch(() => {});
}
}
if (newState.id === this.client.user.id) return;
Expand Down

0 comments on commit 06b391b

Please sign in to comment.