mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-10 15:57:53 +00:00
Fix Build Errors
This commit is contained in:
parent
23cf06df4c
commit
c99784b9dc
19 changed files with 301 additions and 136 deletions
|
|
@ -5,10 +5,9 @@ using System.Net.Http;
|
|||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
using Discord;
|
||||
using Discord.Net;
|
||||
|
||||
using Newtonsoft.Json;
|
||||
using DSharpPlus.Exceptions;
|
||||
using DSharpPlus.Entities;
|
||||
|
||||
using PluralKit.Core;
|
||||
|
||||
|
|
@ -134,13 +133,14 @@ namespace PluralKit.Bot
|
|||
|
||||
try
|
||||
{
|
||||
await ctx.Author.SendFileAsync(stream, "system.json", $"{Emojis.Success} Here you go!");
|
||||
|
||||
var dm = await ctx.Rest.CreateDmAsync(ctx.Author.Id);
|
||||
await dm.SendFileAsync("system.json", stream, $"{Emojis.Success} Here you go!");
|
||||
|
||||
// If the original message wasn't posted in DMs, send a public reminder
|
||||
if (!(ctx.Channel is IDMChannel))
|
||||
if (!(ctx.Channel is DiscordDmChannel))
|
||||
await ctx.Reply($"{Emojis.Success} Check your DMs!");
|
||||
}
|
||||
catch (HttpException)
|
||||
catch (UnauthorizedException)
|
||||
{
|
||||
// If user has DMs closed, tell 'em to open them
|
||||
await ctx.Reply(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue