public async Task SetText([Remainder] string message)
        {
            // Create a target of type SocketGuild so we can retreive information from the GuildProfiles
            SocketGuild target = null;

            target = Context.Guild;
            var guildProfile = GuildProfiles.GetAccount(target); // Guild Profile

            guildProfile.LeaveMessage = message;
            GuildProfiles.SaveProfiles();

            await Context.Channel.SendMessageAsync($":white_check_mark:  Leave message has been set to `{message}`");
        }
        public async Task SetChannel(ulong id)
        {
            // Create a target of type SocketGuild so we can retreive information from the GuildProfiles
            SocketGuild target = null;

            target = Context.Guild;
            var guildProfile = GuildProfiles.GetAccount(target); // Guild Profile

            guildProfile.LeaveChannel = id;
            GuildProfiles.SaveProfiles();

            await Context.Channel.SendMessageAsync($":white_check_mark:  Leave channel has been set to `{id}`");
        }
Beispiel #3
0
        public async Task SetPrefix(string prefix)
        {
            // Create a target of type SocketGuild so we can retreive information from the GuildProfiles
            SocketGuild target = null;

            target = Context.Guild;
            var guildProfile = GuildProfiles.GetAccount(target); // Guild Profile

            guildProfile.CmdPrefix = prefix;
            GuildProfiles.SaveProfiles();

            await Context.Channel.SendMessageAsync($"Command prefix has been set to `{prefix}`");
        }
        public async Task LeaveDisable()
        {
            // Create a target of type SocketGuild so we can retreive information from the GuildProfiles
            SocketGuild target = null;

            target = Context.Guild;
            var guildProfile = GuildProfiles.GetAccount(target); // Guild Profile

            if (guildProfile.LeaveModule)
            {
                guildProfile.LeaveModule = false;
                await Context.Channel.SendMessageAsync(":white_check_mark: Leave Module has been disabled.");
            }
            else
            {
                await Context.Channel.SendMessageAsync(":white_check_mark: Leave Module has already been disabled.");
            }
            GuildProfiles.SaveProfiles();
        }
Beispiel #5
0
        public async Task LevelEnable()
        {
            // Create a target of type SocketGuild so we can retreive information from the GuildProfiles
            SocketGuild target = null;

            target = Context.Guild;
            var guildProfile = GuildProfiles.GetAccount(target); // Guild Profile

            if (!guildProfile.LevelModule)
            {
                guildProfile.LevelModule = true;
                await Context.Channel.SendMessageAsync(":white_check_mark: Level Module has been enabled. Members will still get experince, but the message will not appear.");
            }
            else
            {
                await Context.Channel.SendMessageAsync(":white_check_mark: Level Module has already been enabled.");
            }
            GuildProfiles.SaveProfiles();
        }
        public async Task WarnBanEnable()
        {
            // Create a target of type SocketGuild so we can retreive information from the GuildProfiles
            SocketGuild target = null;

            target = Context.Guild;
            var guildProfile = GuildProfiles.GetAccount(target); // Guild Profile

            if (!guildProfile.WarningsBan)
            {
                guildProfile.WarningsBan  = true;
                guildProfile.WarningsKick = false;
                guildProfile.WarningsMute = false;
                await Context.Channel.SendMessageAsync(":white_check_mark: Warn Ban Module has been enabled.");
            }
            else
            {
                await Context.Channel.SendMessageAsync(":white_check_mark: Warn Ban Module has already been enabled.");
            }
            GuildProfiles.SaveProfiles();
        }
        public async Task WarnAmount(uint amount)
        {
            SocketGuild target = null;

            target = Context.Guild;
            var guildProfile = GuildProfiles.GetAccount(target); // Guild Profile

            uint previousAmount = guildProfile.NumberofWarnings;

            if (amount <= 0)
            {
                await Context.Channel.SendMessageAsync($":negative_squared_cross_mark:  Warn amount cannot be set to {amount}. It must be higher than `0` Setting it back to {previousAmount}");
            }
            else
            {
                guildProfile.NumberofWarnings = amount;
                GuildProfiles.SaveProfiles();

                await Context.Channel.SendMessageAsync($":white_check_mark: Warn amount has been set to {amount}");
            }
        }