mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-05-10 20:35:02 +00:00
feat: add editing support to InternalPoster
This commit is contained in:
parent
ecd9a5863c
commit
31f18ba27f
6 changed files with 113 additions and 39 deletions
|
@ -56,8 +56,12 @@ export async function postCaseToCaseLogChannel(
|
|||
const [channelId, messageId] = theCase.log_message_id.split("-");
|
||||
|
||||
try {
|
||||
const poster = pluginData.getPlugin(InternalPosterPlugin);
|
||||
const channel = pluginData.guild.channels.resolve(channelId as Snowflake) as TextChannel;
|
||||
await channel.messages.edit(messageId as Snowflake, caseEmbed);
|
||||
const message = await channel.messages.fetch(messageId);
|
||||
if (message) {
|
||||
await poster.editMessage(message, caseEmbed);
|
||||
}
|
||||
return;
|
||||
} catch {} // tslint:disable-line:no-empty
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue