mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01:00
refactor(Guild)/fix(Util): use resolveID and regex for cleanCod… (#3837)
* refactor(Guild): use resolveID instead of resolve(...).id * fix(Util): use regex for cleanCodeBlockContent
This commit is contained in:
@@ -861,7 +861,7 @@ class Guild extends Base {
|
||||
}
|
||||
if (data.afkTimeout) _data.afk_timeout = Number(data.afkTimeout);
|
||||
if (typeof data.icon !== 'undefined') _data.icon = data.icon;
|
||||
if (data.owner) _data.owner_id = this.client.users.resolve(data.owner).id;
|
||||
if (data.owner) _data.owner_id = this.client.users.resolveID(data.owner);
|
||||
if (data.splash) _data.splash = data.splash;
|
||||
if (data.banner) _data.banner = data.banner;
|
||||
if (typeof data.explicitContentFilter !== 'undefined') {
|
||||
|
||||
@@ -567,7 +567,7 @@ class Util {
|
||||
* @returns {string}
|
||||
*/
|
||||
static cleanCodeBlockContent(text) {
|
||||
return text.replace('```', '`\u200b``');
|
||||
return text.replace(/```/g, '`\u200b``');
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user