Пример #1
0
        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());
        }
Пример #2
0
        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());
        }
Пример #3
0
        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);
        }