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 # Fody - auto-generated XML schema
FodyWeavers.xsd FodyWeavers.xsd
# Manually added folders
Windows-x64/ Windows-x64/
Linux-x64/ Linux-x64/
.idea
.vs

View file

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

View file

@ -21,7 +21,7 @@ namespace SupportChild
public EventHandler(DiscordClient client) public EventHandler(DiscordClient client)
{ {
discordClient = client; this.discordClient = client;
} }
internal Task OnReady(DiscordClient client, ReadyEventArgs e) internal Task OnReady(DiscordClient client, ReadyEventArgs e)
@ -35,7 +35,7 @@ namespace SupportChild
activityType = ActivityType.Playing; 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; return Task.CompletedTask;
} }
@ -105,7 +105,7 @@ namespace SupportChild
DiscordEmbed error = new DiscordEmbedBuilder DiscordEmbed error = new DiscordEmbedBuilder
{ {
Color = DiscordColor.Red, Color = DiscordColor.Red,
Description = ParseFailedCheck(attr) Description = this.ParseFailedCheck(attr)
}; };
e.Context?.Channel?.SendMessageAsync(error); e.Context?.Channel?.SendMessageAsync(error);
} }

View file

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