3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-05-18 07:35:02 +00:00

Add GuildArchives.getUrl for getting the archive entry URL

This commit is contained in:
Dragory 2019-01-15 04:03:04 +02:00
parent 6f48ba932f
commit 0558fc7ab2
3 changed files with 9 additions and 5 deletions

View file

@ -341,14 +341,14 @@ export class LogsPlugin extends Plugin {
async onMessageDeleteBulk(savedMessages: SavedMessage[]) {
const channel = this.guild.channels.get(savedMessages[0].channel_id);
const archiveId = await this.archives.createFromSavedMessages(savedMessages, this.guild);
const baseUrl = this.knub.getGlobalConfig().url;
const archiveUrl = this.archives.getUrl(this.knub.getGlobalConfig().url, archiveId);
this.guildLogs.log(
LogType.MESSAGE_DELETE_BULK,
{
count: savedMessages.length,
channel,
archiveUrl: `${baseUrl}/archives/${archiveId}`
archiveUrl
},
savedMessages[0].id
);