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:
Sugden
2020-02-28 17:26:37 +00:00
committed by GitHub
parent 1af1e0cbb8
commit 3d0c1df19d
2 changed files with 2 additions and 2 deletions

View File

@@ -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') {

View File

@@ -567,7 +567,7 @@ class Util {
* @returns {string}
*/
static cleanCodeBlockContent(text) {
return text.replace('```', '`\u200b``');
return text.replace(/```/g, '`\u200b``');
}
/**