fmt on src folder

This commit is contained in:
Skillz
2020-08-07 10:13:07 -04:00
parent 602337bc2c
commit 8cf4f137b9
7 changed files with 23 additions and 24 deletions
+5 -2
View File
@@ -130,8 +130,11 @@ export async function sendMessage(
}
}
if (content.embed && !botHasChannelPermissions(channel.id, [Permissions.EMBED_LINKS])) {
throw new Error(Errors.MISSING_EMBED_LINKS)
if (
content.embed &&
!botHasChannelPermissions(channel.id, [Permissions.EMBED_LINKS])
) {
throw new Error(Errors.MISSING_EMBED_LINKS);
}
// Use ... for content length due to unicode characters and js .length handling
+2 -2
View File
@@ -259,7 +259,7 @@ export async function createGuildRole(
const roleData = result as RoleData;
const role = createRole(roleData);
const guild = cache.guilds.get(guildID)
const guild = cache.guilds.get(guildID);
guild?.roles.set(role.id, role);
return role;
}
@@ -511,7 +511,7 @@ export function channelHasPermissions(
const role = guild.roles.get(roleID);
if (!role) return bits;
bits |= BigInt(role.permissions_new)
bits |= BigInt(role.permissions_new);
return bits;
}, BigInt(0));
+5 -1
View File
@@ -104,7 +104,11 @@ export function removeAllReactions(channelID: string, messageID: string) {
}
/** Removes all reactions for a single emoji on this message. Reaction takes the form of **name:id** for custom guild emoji, or Unicode characters. */
export function removeReactionEmoji(channelID: string, messageID: string, reaction: string) {
export function removeReactionEmoji(
channelID: string,
messageID: string,
reaction: string,
) {
if (
!botHasChannelPermissions(channelID, [Permissions.MANAGE_MESSAGES])
) {