Add proper types to sendErrorMessage()
This commit is contained in:
parent
6896afebfa
commit
edaeb7ef0e
23 changed files with 123 additions and 78 deletions
|
@ -16,7 +16,8 @@ export const ScheduledPostsDeleteCmd = postCmd({
|
|||
scheduledPosts.sort(sorter("post_at"));
|
||||
const post = scheduledPosts[args.num - 1];
|
||||
if (!post) {
|
||||
return sendErrorMessage(pluginData, msg.channel, "Scheduled post not found");
|
||||
sendErrorMessage(pluginData, msg.channel, "Scheduled post not found");
|
||||
return;
|
||||
}
|
||||
|
||||
await pluginData.state.scheduledPosts.delete(post.id);
|
||||
|
|
|
@ -18,7 +18,8 @@ export const ScheduledPostsShowCmd = postCmd({
|
|||
scheduledPosts.sort(sorter("post_at"));
|
||||
const post = scheduledPosts[args.num - 1];
|
||||
if (!post) {
|
||||
return sendErrorMessage(pluginData, msg.channel, "Scheduled post not found");
|
||||
sendErrorMessage(pluginData, msg.channel, "Scheduled post not found");
|
||||
return;
|
||||
}
|
||||
|
||||
postMessage(pluginData, msg.channel as TextChannel, post.content, post.attachments, post.enable_mentions);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue