mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-12 00:30:11 +00:00
Port some more commands, mostly for embeds
This commit is contained in:
parent
9d919d687b
commit
2e0c30eb5d
13 changed files with 140 additions and 135 deletions
|
|
@ -1,7 +1,6 @@
|
|||
using System.Threading.Tasks;
|
||||
|
||||
using DSharpPlus.Entities;
|
||||
using DSharpPlus.Exceptions;
|
||||
using Myriad.Rest.Exceptions;
|
||||
|
||||
using PluralKit.Core;
|
||||
|
||||
|
|
@ -33,14 +32,16 @@ namespace PluralKit.Bot
|
|||
await dm.SendMessageFixedAsync(token);
|
||||
|
||||
// If we're not already in a DM, reply with a reminder to check
|
||||
if (!(ctx.Channel is DiscordDmChannel))
|
||||
await ctx.Reply($"{Emojis.Success} Check your DMs!");
|
||||
// TODO: DMs
|
||||
// if (!(ctx.Channel is DiscordDmChannel))
|
||||
// await ctx.Reply($"{Emojis.Success} Check your DMs!");
|
||||
}
|
||||
catch (UnauthorizedException)
|
||||
{
|
||||
// Can't check for permission errors beforehand, so have to handle here :/
|
||||
if (!(ctx.Channel is DiscordDmChannel))
|
||||
await ctx.Reply($"{Emojis.Error} Could not send token in DMs. Are your DMs closed?");
|
||||
// TODO: DMs
|
||||
// if (!(ctx.Channel is DiscordDmChannel))
|
||||
// await ctx.Reply($"{Emojis.Error} Could not send token in DMs. Are your DMs closed?");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -74,14 +75,16 @@ namespace PluralKit.Bot
|
|||
await dm.SendMessageFixedAsync(token);
|
||||
|
||||
// If we're not already in a DM, reply with a reminder to check
|
||||
if (!(ctx.Channel is DiscordDmChannel))
|
||||
await ctx.Reply($"{Emojis.Success} Check your DMs!");
|
||||
// TODO: DMs
|
||||
// if (!(ctx.Channel is DiscordDmChannel))
|
||||
// await ctx.Reply($"{Emojis.Success} Check your DMs!");
|
||||
}
|
||||
catch (UnauthorizedException)
|
||||
{
|
||||
// Can't check for permission errors beforehand, so have to handle here :/
|
||||
if (!(ctx.Channel is DiscordDmChannel))
|
||||
await ctx.Reply($"{Emojis.Error} Could not send token in DMs. Are your DMs closed?");
|
||||
// TODO: DMs
|
||||
// if (!(ctx.Channel is DiscordDmChannel))
|
||||
// await ctx.Reply($"{Emojis.Error} Could not send token in DMs. Are your DMs closed?");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue