Format the project with 'dotnet format' (#2551)
* Sync and Re-Format * Fix Title string. * Fix indentation.
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
using Discord;
|
||||
using Discord.WebSocket;
|
||||
using System;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using Discord;
|
||||
using Discord.WebSocket;
|
||||
|
||||
namespace BasicBot
|
||||
{
|
||||
@@ -112,7 +112,8 @@ namespace BasicBot
|
||||
if (component.Data.CustomId == "unique-id")
|
||||
await interaction.RespondAsync("Thank you for clicking my button!");
|
||||
|
||||
else Console.WriteLine("An ID has been received that has no handler!");
|
||||
else
|
||||
Console.WriteLine("An ID has been received that has no handler!");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,7 +30,8 @@ namespace InteractionFramework.Attributes
|
||||
? Task.FromResult(PreconditionResult.FromSuccess())
|
||||
: Task.FromResult(PreconditionResult.FromError("User ID does not match component ID!"));
|
||||
|
||||
else return Task.FromResult(PreconditionResult.FromError("Parse cannot be done if no userID exists."));
|
||||
else
|
||||
return Task.FromResult(PreconditionResult.FromError("Parse cannot be done if no userID exists."));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace InteractionFramework.Attributes
|
||||
{
|
||||
public class RequireOwnerAttribute : PreconditionAttribute
|
||||
{
|
||||
public override async Task<PreconditionResult> CheckRequirementsAsync (IInteractionContext context, ICommandInfo commandInfo, IServiceProvider services)
|
||||
public override async Task<PreconditionResult> CheckRequirementsAsync(IInteractionContext context, ICommandInfo commandInfo, IServiceProvider services)
|
||||
{
|
||||
switch (context.Client.TokenType)
|
||||
{
|
||||
|
||||
@@ -26,7 +26,7 @@ namespace InteractionFramework.Modules
|
||||
|
||||
// [Summary] lets you customize the name and the description of a parameter
|
||||
[SlashCommand("echo", "Repeat the input")]
|
||||
public async Task Echo(string echo, [Summary(description: "mention the user")]bool mention = false)
|
||||
public async Task Echo(string echo, [Summary(description: "mention the user")] bool mention = false)
|
||||
=> await RespondAsync(echo + (mention ? Context.User.Mention : string.Empty));
|
||||
|
||||
[SlashCommand("ping", "Pings the bot and returns its latency.")]
|
||||
|
||||
@@ -64,11 +64,11 @@ namespace InteractionFramework
|
||||
|
||||
public static bool IsDebug()
|
||||
{
|
||||
#if DEBUG
|
||||
return true;
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
#if DEBUG
|
||||
return true;
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user