updated some stuff

This commit is contained in:
EmotionChild 2022-05-18 01:09:25 +12:00
parent 94324f4d4a
commit ad0916477b
5 changed files with 1052 additions and 1049 deletions

3
.gitignore vendored
View file

@ -362,5 +362,8 @@ MigrationBackup/
# Fody - auto-generated XML schema
FodyWeavers.xsd
# Manually added folders
Windows-x64/
Linux-x64/
.idea
.vs

View file

@ -647,17 +647,17 @@ namespace SupportChild
public Ticket(MySqlDataReader reader)
{
id = reader.GetUInt32("id");
createdTime = reader.GetDateTime("created_time");
creatorID = reader.GetUInt64("creator_id");
assignedStaffID = reader.GetUInt64("assigned_staff_id");
summary = reader.GetString("summary");
channelID = reader.GetUInt64("channel_id");
this.id = reader.GetUInt32("id");
this.createdTime = reader.GetDateTime("created_time");
this.creatorID = reader.GetUInt64("creator_id");
this.assignedStaffID = reader.GetUInt64("assigned_staff_id");
this.summary = reader.GetString("summary");
this.channelID = reader.GetUInt64("channel_id");
}
public string FormattedCreatedTime()
{
return createdTime.ToString(Config.timestampFormat);
return this.createdTime.ToString(Config.timestampFormat);
}
}
public class StaffMember
@ -668,9 +668,9 @@ namespace SupportChild
public StaffMember(MySqlDataReader reader)
{
userID = reader.GetUInt64("user_id");
name = reader.GetString("name");
active = reader.GetBoolean("active");
this.userID = reader.GetUInt64("user_id");
this.name = reader.GetString("name");
this.active = reader.GetBoolean("active");
}
}
@ -682,9 +682,9 @@ namespace SupportChild
public Message(MySqlDataReader reader)
{
identifier = reader.GetString("identifier");
userID = reader.GetUInt64("user_id");
message = reader.GetString("message");
this.identifier = reader.GetString("identifier");
this.userID = reader.GetUInt64("user_id");
this.message = reader.GetString("message");
}
}
}

View file

@ -21,7 +21,7 @@ namespace SupportChild
public EventHandler(DiscordClient client)
{
discordClient = client;
this.discordClient = client;
}
internal Task OnReady(DiscordClient client, ReadyEventArgs e)
@ -35,7 +35,7 @@ namespace SupportChild
activityType = ActivityType.Playing;
}
discordClient.UpdateStatusAsync(new DiscordActivity(Config.presenceText, activityType), UserStatus.Online);
this.discordClient.UpdateStatusAsync(new DiscordActivity(Config.presenceText, activityType), UserStatus.Online);
return Task.CompletedTask;
}
@ -105,7 +105,7 @@ namespace SupportChild
DiscordEmbed error = new DiscordEmbedBuilder
{
Color = DiscordColor.Red,
Description = ParseFailedCheck(attr)
Description = this.ParseFailedCheck(attr)
};
e.Context?.Channel?.SendMessageAsync(error);
}
@ -206,7 +206,7 @@ namespace SupportChild
{
Color = DiscordColor.Green,
Description = "Ticket " + ticketChannel.Mention + " opened by " + member.Mention + ".\n",
Footer = new DiscordEmbedBuilder.EmbedFooter { Text = "Ticket " + ticketID }
Footer = new DiscordEmbedBuilder.EmbedFooter {Text = "Ticket " + ticketID}
};
await logChannel.SendMessageAsync(logMessage);
}
@ -241,7 +241,7 @@ namespace SupportChild
{
if (Database.TryGetOpenTickets(e.Member.Id, out List<Database.Ticket> ownTickets))
{
foreach (Database.Ticket ticket in ownTickets)
foreach(Database.Ticket ticket in ownTickets)
{
try
{

View file

@ -1,4 +1,4 @@
bot:
bot:
# Bot token.
token: "<add-token-here>"
# Command prefix.
@ -43,7 +43,7 @@ database:
address: "127.0.0.1"
port: 3306
# Name of the database to use
name: "supportbot"
name: "supportchild"
# Username and password for authentication
user: ""
password: ""