public async Task CommandPrefixReset() { GuildDataIO io = new GuildDataIO(Context.Guild.Id); io.Write(new GuildData()); await ReplyAsync(string.Empty, false, new EmbedBuilder() { Title = "Prefix Reset!", Description = string.Format("Command prefix of the guild has reset. (`!`)"), Color = Color.Green }.Build()); }
public async Task CommandPrefix(string prefix) { GuildDataIO io = new GuildDataIO(Context.Guild.Id); GuildData guildData = io.Read(); guildData.CommandPrefix = prefix; io.Write(guildData); await ReplyAsync(string.Empty, false, new EmbedBuilder() { Title = "Prefix Changed!", Description = string.Format("Command prefix of the guild has changed to `{0}`.", prefix), Color = Color.Green }.Build()); }
private Task JoinedGuild(SocketGuild arg) { Logger.Info("Guild", "Bot joined guild \"{0}({1})\".", arg.Name, arg.Id); GuildDataIO guildDataIO = new GuildDataIO(arg.Id); if (!guildDataIO.DirectoryExists()) { guildDataIO.CreateDirectory(); } if (!guildDataIO.Exists()) { guildDataIO.Write(new GuildData()); } return(Task.CompletedTask); }