File tree Expand file tree Collapse file tree 4 files changed +7
-7
lines changed Expand file tree Collapse file tree 4 files changed +7
-7
lines changed Original file line number Diff line number Diff line change 8383 *
8484 * @property {'EmojiType' } EmojiType
8585 * @property {'EmojiManaged' } EmojiManaged
86- * @property {'MissingManageGuildExpressionsPermission ' } MissingManageGuildExpressionsPermission
86+ * @property {'MissingGuildExpressionsPermission ' } MissingGuildExpressionsPermission
8787 *
8888 * @property {'NotGuildSoundboardSound' } NotGuildSoundboardSound
8989 * @property {'NotGuildSticker' } NotGuildSticker
@@ -217,7 +217,7 @@ const keys = [
217217
218218 'EmojiType' ,
219219 'EmojiManaged' ,
220- 'MissingManageGuildExpressionsPermission ' ,
220+ 'MissingGuildExpressionsPermission ' ,
221221
222222 'NotGuildSoundboardSound' ,
223223 'NotGuildSticker' ,
Original file line number Diff line number Diff line change @@ -88,8 +88,8 @@ const Messages = {
8888
8989 [ ErrorCodes . EmojiType ] : 'Emoji must be a string or GuildEmoji/ReactionEmoji' ,
9090 [ ErrorCodes . EmojiManaged ] : 'Emoji is managed and has no Author.' ,
91- [ ErrorCodes . MissingManageGuildExpressionsPermission ] : guild =>
92- `Client must have Manage Guild Expressions permission in guild ${ guild } to see emoji authors.` ,
91+ [ ErrorCodes . MissingGuildExpressionsPermission ] : guild =>
92+ `Client must have Create Guild Expressions or Manage Guild Expressions permission in guild ${ guild } to see emoji authors.` ,
9393
9494 [ ErrorCodes . NotGuildSoundboardSound ] : action =>
9595 `Soundboard sound is a default (non-guild) soundboard sound and can't be ${ action } .` ,
Original file line number Diff line number Diff line change @@ -251,8 +251,8 @@ class GuildEmojiManager extends CachedManager {
251251
252252 const { me } = this . guild . members ;
253253 if ( ! me ) throw new DiscordjsError ( ErrorCodes . GuildUncachedMe ) ;
254- if ( ! me . permissions . has ( PermissionFlagsBits . ManageGuildExpressions ) ) {
255- throw new DiscordjsError ( ErrorCodes . MissingManageGuildExpressionsPermission , this . guild ) ;
254+ if ( ! me . permissions . any ( PermissionFlagsBits . CreateGuildExpressions | PermissionFlagsBits . ManageGuildExpressions ) ) {
255+ throw new DiscordjsError ( ErrorCodes . MissingGuildExpressionsPermission , this . guild ) ;
256256 }
257257
258258 const data = await this . client . rest . get ( Routes . guildEmoji ( this . guild . id , resolvedEmoji . id ) ) ;
Original file line number Diff line number Diff line change @@ -4051,7 +4051,7 @@ export enum DiscordjsErrorCodes {
40514051
40524052 EmojiType = 'EmojiType' ,
40534053 EmojiManaged = 'EmojiManaged' ,
4054- MissingManageGuildExpressionsPermission = 'MissingManageGuildExpressionsPermission ' ,
4054+ MissingGuildExpressionsPermission = 'MissingGuildExpressionsPermission ' ,
40554055
40564056 NotGuildSoundboardSound = 'NotGuildSoundboardSound' ,
40574057 NotGuildSticker = 'NotGuildSticker' ,
You can’t perform that action at this time.
0 commit comments