General cleanup of imports, indenting and logging source
This commit is contained in:
parent
f4472e044d
commit
11ab5186b8
@ -3,9 +3,7 @@ using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Text;
|
||||
using Antlr4.Runtime;
|
||||
using ChaosBot.Database;
|
||||
using Microsoft.Data.Sqlite;
|
||||
using NLog;
|
||||
|
||||
namespace ChaosBot.Attribute
|
||||
|
||||
@ -1,6 +1,5 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Discord;
|
||||
using Microsoft.Data.Sqlite;
|
||||
|
||||
namespace ChaosBot.Attribute
|
||||
|
||||
@ -1,7 +1,6 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using Microsoft.Data.Sqlite;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
@ -48,7 +47,7 @@ namespace ChaosBot.Database
|
||||
throw;
|
||||
}
|
||||
|
||||
_logger.Fatal($"Controllers.DBWork.RawQuery: Exception [{ex}] thrown, <[{ex.Message}]>.");
|
||||
_logger.Fatal($"Database.Controller.RawQuery: Exception [{ex}] thrown, <[{ex.Message}]>.");
|
||||
}
|
||||
|
||||
return dt;
|
||||
@ -99,7 +98,7 @@ namespace ChaosBot.Database
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.Fatal($"Controllers.DBWork.RawQuery: Exception [{ex}] thrown, <[{ex.Message}]>.");
|
||||
_logger.Fatal($"Database.Controller.InsertQuery: Exception [{ex}] thrown, <[{ex.Message}]>.");
|
||||
}
|
||||
}
|
||||
|
||||
@ -149,7 +148,7 @@ namespace ChaosBot.Database
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.Fatal($"Controllers.DBWork.RawQuery: Exception [{ex}] thrown, <[{ex.Message}]>.");
|
||||
_logger.Fatal($"Database.Controller.UpdateQuery: Exception [{ex}] thrown, <[{ex.Message}]>.");
|
||||
}
|
||||
}
|
||||
|
||||
@ -253,7 +252,7 @@ namespace ChaosBot.Database
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.Fatal($"Controllers.DBWork.RawQuery: Exception [{ex}] thrown, <[{ex.Message}]>.");
|
||||
_logger.Fatal($"Database.Controller.SelectQuery: Exception [{ex}] thrown, <[{ex.Message}]>.");
|
||||
}
|
||||
|
||||
return dt;
|
||||
@ -305,7 +304,7 @@ namespace ChaosBot.Database
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.Fatal($"Controllers.DBWork.RawQuery: Exception [{ex}] thrown, <[{ex.Message}]>.");
|
||||
_logger.Fatal($"Database.Controller.DeleteQuery: Exception [{ex}] thrown, <[{ex.Message}]>.");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,10 +1,8 @@
|
||||
using System;
|
||||
using Discord;
|
||||
using System.Text;
|
||||
using Discord.Commands;
|
||||
using System.Threading.Tasks;
|
||||
using System.Collections.Generic;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using NLog;
|
||||
|
||||
|
||||
@ -23,16 +21,16 @@ namespace ChaosBot.Discord.Modules
|
||||
{
|
||||
try
|
||||
{
|
||||
IEnumerable<IMessage> messages = await Context.Channel.GetMessagesAsync(msgtoDelete + 1).FlattenAsync();
|
||||
await ((ITextChannel) Context.Channel).DeleteMessagesAsync(messages);
|
||||
const int delay = 3000;
|
||||
IUserMessage m = await ReplyAsync($"{msgtoDelete} messages deleted.");
|
||||
await Task.Delay(delay);
|
||||
await m.DeleteAsync();
|
||||
IEnumerable<IMessage> messages = await Context.Channel.GetMessagesAsync(msgtoDelete + 1).FlattenAsync();
|
||||
await ((ITextChannel) Context.Channel).DeleteMessagesAsync(messages);
|
||||
const int delay = 3000;
|
||||
IUserMessage m = await ReplyAsync($"{msgtoDelete} messages deleted.");
|
||||
await Task.Delay(delay);
|
||||
await m.DeleteAsync();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.Error($"InfoCommands.InfoCommand: Exception [{ex}] thrown, <[{ex.Message}]>.");
|
||||
_logger.Error($"AdminCommands.ClearCommand: Exception [{ex}] thrown, <[{ex.Message}]>.");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -44,7 +44,7 @@ namespace ChaosBot.Discord.Modules
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.Error($"diceCommands.RollCommand: Exception [{ex}] thrown, <[{ex.Message}]>.");
|
||||
_logger.Error($"DiceCommands.Roll: Exception [{ex}] thrown, <[{ex.Message}]>.");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -1,6 +1,5 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using ChaosBot.Database.Entity;
|
||||
@ -52,7 +51,7 @@ namespace ChaosBot.Discord.Modules
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.Error($"InfoCommands.InfoCommand: Exception [{ex}] thrown, <[{ex.Message}]>.");
|
||||
_logger.Error($"RaffleSystem.RaffleCommandInfo: Exception [{ex}] thrown, <[{ex.Message}]>.");
|
||||
}
|
||||
}
|
||||
|
||||
@ -128,7 +127,7 @@ namespace ChaosBot.Discord.Modules
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.Error($"InfoCommands.InfoCommand: Exception [{ex}] thrown, <[{ex.Message}]>.");
|
||||
_logger.Error($"RaffleSystem.RaffleCommandHelper: Exception [{ex}] thrown, <[{ex.Message}]>.");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -1,6 +1,5 @@
|
||||
using NLog;
|
||||
using System;
|
||||
using System.Reflection;
|
||||
using ChaosBot.Discord;
|
||||
using System.Threading.Tasks;
|
||||
using ChaosBot.Attribute;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user