mirror of
https://github.com/discordeno/discordeno.git
synced 2026-06-16 03:18:17 +00:00
fmt on src folder
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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));
|
||||
|
||||
@@ -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])
|
||||
) {
|
||||
|
||||
Reference in New Issue
Block a user