Skip to content

Commit

Permalink
unnecessary ternary
Browse files Browse the repository at this point in the history
  • Loading branch information
3vorp committed Jun 2, 2024
1 parent 97c25bd commit 6a4df15
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 1 addition & 3 deletions src/helpers/functions/formatLog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,7 @@ export function formatLogURL(data: any) {

// slash command constructed url
if (data.guildId && data.channelId)
return `https://discord.com/channels/${data.guildId}/${data.channelId}/${
data.messageId ? data.messageId : ""
}`;
return `https://discord.com/channels/${data.guildId}/${data.channelId}/${data.messageId || ""}`;

if (data.guild) return `Guild ID is ${data.guild.id}`;

Expand Down
2 changes: 1 addition & 1 deletion src/helpers/images/ColorManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ export default class ColorManager {
}
} else options.hex = "000000ff";

const arr = options.hex.match(/.{2}/g); // cut it each 2 chars;
const arr = options.hex.match(/.{2}/g); // split into groups of two
this.color = {
r: parseInt(arr[0], 16),
g: parseInt(arr[1], 16),
Expand Down

0 comments on commit 6a4df15

Please sign in to comment.