Publish dBWork
This commit is contained in:
parent
d383bd43d4
commit
c0760b7c1f
@ -6,12 +6,12 @@ using NLog;
|
||||
|
||||
namespace ChaosBot.Controllers
|
||||
{
|
||||
public class Database
|
||||
public class DBWork
|
||||
{
|
||||
private SqliteConnection _conn = new SqliteConnection($"Data Source={System.IO.Directory.GetCurrentDirectory()}{Program.Cfg.GetValue<string>("Bot:Database")}");
|
||||
private static SqliteConnection _conn = new SqliteConnection($"Data Source={System.IO.Directory.GetCurrentDirectory()}{Program.Cfg.GetValue<string>("Bot:Database")}");
|
||||
private static Logger _logger = Program._logger;
|
||||
|
||||
public DataTable RawQuery(string query)
|
||||
public static DataTable RawQuery(string query)
|
||||
{
|
||||
DataTable dt = new DataTable();
|
||||
|
||||
@ -32,7 +32,7 @@ namespace ChaosBot.Controllers
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.Fatal($"Controllers.Database.RawQuery: Exception [{ex}] thrown, <[{ex.Message}]>.");
|
||||
_logger.Fatal($"Controllers.DBWork.RawQuery: Exception [{ex}] thrown, <[{ex.Message}]>.");
|
||||
}
|
||||
|
||||
return dt;
|
||||
@ -4,11 +4,11 @@ using System.Text;
|
||||
using Discord.Commands;
|
||||
using System.Threading.Tasks;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using ChaosBot.Controllers;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using NLog;
|
||||
|
||||
|
||||
namespace ChaosBot.Discord.Modules
|
||||
{
|
||||
public class InfoCommands : ModuleBase
|
||||
@ -31,7 +31,10 @@ namespace ChaosBot.Discord.Modules
|
||||
sb.AppendLine();
|
||||
sb.AppendLine($"Bot Version: {Program.Cfg.GetValue<string>("Bot:Version")}");
|
||||
sb.AppendLine($"Bot Prefix: {Program.Cfg.GetValue<string>("Discord:Prefix")}");
|
||||
sb.AppendLine($"");
|
||||
|
||||
DataTable dr = DBWork.RawQuery("Show Create Table RaffleTable;");
|
||||
|
||||
/*
|
||||
* Add the string to the Embed
|
||||
*/
|
||||
|
||||
Loading…
Reference in New Issue
Block a user