From 5ba6362c7879f41a110b60384b08e993ac7d258d Mon Sep 17 00:00:00 2001 From: Pierre HUBERT Date: Sat, 18 Apr 2020 12:15:42 +0200 Subject: [PATCH] Can delete all the emojies of a specified user --- src/helpers/CustomEmojisHelper.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/helpers/CustomEmojisHelper.ts b/src/helpers/CustomEmojisHelper.ts index c7d1090..93957f2 100644 --- a/src/helpers/CustomEmojisHelper.ts +++ b/src/helpers/CustomEmojisHelper.ts @@ -97,6 +97,16 @@ export class CustomEmojisHelper { } + /** + * Delete all the emojies of the user + * + * @param userID Target user ID + */ + public static async DeleteAllUser(userID: number) { + for(const emoji of await this.GetListUser(userID)) + await this.Delete(emoji); + } + /** * Turn a database entry into a custom emoji *