From cd46abb57810b0eb7b4168808a92d159a9888afc Mon Sep 17 00:00:00 2001 From: almeidx Date: Sat, 14 Aug 2021 15:11:40 +0100 Subject: [PATCH] leftover conflicts --- .../plugins/Utility/commands/NicknameCmd.ts | 8 ----- backend/src/utils.ts | 29 ------------------- 2 files changed, 37 deletions(-) diff --git a/backend/src/plugins/Utility/commands/NicknameCmd.ts b/backend/src/plugins/Utility/commands/NicknameCmd.ts index 21eb1a47..75f6699d 100644 --- a/backend/src/plugins/Utility/commands/NicknameCmd.ts +++ b/backend/src/plugins/Utility/commands/NicknameCmd.ts @@ -39,17 +39,9 @@ export const NicknameCmd = utilityCmd({ const oldNickname = args.member.nickname || ""; try { -<<<<<<< HEAD await args.member.setNickname(args.nickname ?? null); } catch { msg.channel.send(errorMessage("Failed to change nickname")); -======= - await args.member.edit({ - nick: args.nickname, - }); - } catch { - msg.channel.createMessage(errorMessage("Failed to change nickname")); ->>>>>>> 1ad3f4dd (removed unused exception parameter) return; } diff --git a/backend/src/utils.ts b/backend/src/utils.ts index b5a13fb9..370bf048 100644 --- a/backend/src/utils.ts +++ b/backend/src/utils.ts @@ -786,35 +786,6 @@ export function deactivateMentions(content: string): string { return content.replace(/@/g, "@\u200b"); } -<<<<<<< HEAD -======= -/** - * Disable inline code in the given string by replacing backticks/grave accents with acute accents - * FIXME: Find a better way that keeps the grave accents? Can't use the code block approach here since it's just 1 character. - */ -export function disableInlineCode(content: string): string { - return content.replace(/`/g, "\u00b4"); -} - -/** - * Disable code blocks in the given string by adding invisible unicode characters between backticks - */ -export function disableCodeBlocks(content: string): string { - return content.replace(/`/g, "`\u200b"); -} - -/** - * Disable bold in the given string by escaping the asterisks - */ -export function disableBold(content: string): string { - let i = 0; - return content.replace(/\*\*(\*)?/g, (_, match) => { - if (match) return ++i % 2 ? `${match}\\*\\*` : `\\*\\*${match}`; - return "\\*\\*"; - }); -} - ->>>>>>> 67f0227a (the commmand now sends the nickname of the member when a nickname isnt provided) export function useMediaUrls(content: string): string { return content.replace(/cdn\.discord(app)?\.com/g, "media.discordapp.net"); }