Exemplo n.º 1
0
        public async Task Config(string Action, string Option = null, string Value = null)
        {
            if (Context.Channel is IPrivateChannel)
            {
                return;
            }

            await ManagmentService.Config(Context.Guild, Context.Channel, Context.Message, Action, Option, Value);
        }
Exemplo n.º 2
0
        public async Task Giveaway(uint TimeInHours, uint Money = 0, IRole role = null)
        {
            if (Context.Channel is IPrivateChannel)
            {
                return;
            }

            await ManagmentService.Giveaway(Context.Guild, Context.Message, TimeInHours, Money, role);
        }
Exemplo n.º 3
0
        public async Task SayAsBot([Remainder] string text = "")
        {
            if (Context.Channel is IPrivateChannel)
            {
                return;
            }

            await ManagmentService.SayAsBot(Context.Message, Context.Channel, text);
        }
Exemplo n.º 4
0
        public async Task Vote(string option, [Remainder] string question)
        {
            if (Context.Channel is IPrivateChannel)
            {
                return;
            }

            await ManagmentService.Vote(Context.Guild, Context.Message, (IGuildUser)Context.User, question, option);
        }
Exemplo n.º 5
0
        public async Task Announcment([Remainder] string content)
        {
            if (Context.Channel is IPrivateChannel)
            {
                return;
            }

            await ManagmentService.Announcment(Context.Guild, Context.Message, (IGuildUser)Context.User, content);
        }
Exemplo n.º 6
0
        public async Task DemoteUser(IGuildUser user, IRole role, [Remainder] string reason = "Brak.")
        {
            if (Context.Channel is IPrivateChannel)
            {
                return;
            }

            await ManagmentService.Demote(Context.Guild, Context.Message, role, user, (IGuildUser)Context.User, reason);
        }
Exemplo n.º 7
0
        public async Task BanUser(IGuildUser user, [Remainder] string reason = "Brak.")
        {
            if (Context.Channel is IPrivateChannel)
            {
                return;
            }

            if (user.GuildPermissions.ManageMessages)
            {
                return;
            }
            await ManagmentService.Ban(Context.Guild, Context.Message, user, (IGuildUser)Context.User, reason);
        }
Exemplo n.º 8
0
        public async Task MuteUser(IGuildUser user, int TimeInSeconds = 0, [Remainder] string reason = "Brak.")
        {
            if (Context.Channel is IPrivateChannel)
            {
                return;
            }

            if (user.GuildPermissions.ManageNicknames)
            {
                return;
            }
            await ManagmentService.Mute(Context.Guild, Context.Message, user, (IGuildUser)Context.User, TimeInSeconds, reason);
        }
Exemplo n.º 9
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (Session["Wname"] == null || Session["Cname"] == null || Session["Wname"].ToString() == "" || Session["Cname"].ToString() == "")
     {
         Session.Abandon();
         Response.Redirect("Default.aspx");
     }
     if ((!Session["Wname"].ToString().Equals("5410c239adb1b45866f162e5ec829ca9")) ||
         (!Session["Cname"].ToString().Equals("2cb6e810b21db557600c5bd1ddba81b2")))
     {
         Session.Abandon();
         Response.Redirect("Default.aspx");
     }
     ManagmentService ss = new ManagmentService();
     // Num_Of_SMS=ss.GetCredit("*****@*****.**","d1a1n1");
 }
Exemplo n.º 10
0
        public static async Task AntiAdvertisment(SocketMessage msg)
        {
            if (msg.Author.IsBot)
            {
                return;
            }
            if (msg.Channel is IPrivateChannel)
            {
                return;
            }

            var guildChannel = msg.Channel as IGuildChannel;
            var guild        = guildChannel.Guild as SocketGuild;
            var user         = msg.Author as SocketGuildUser;
            var rola         = guild.Roles.FirstOrDefault(x => x.Id == 446765076490223618);


            if (Global.Advertismentwords.Any(word => msg.Content.ToLower().Contains(word)) == false || msg.Content.Contains("discord.gg/xXKrd5R") || user.Roles.Contains(rola))
            {
                return;
            }
            {
                var pamietaj = Emote.Parse("<:thinksmart:460770233171443713>");
                await msg.DeleteAsync();

                var MessageToRemove = await msg.Channel.SendMessageAsync($":rage: {msg.Author.Mention} Reklamowanie cudzych serwerów nie jest dozwolone! :warning: Dopisuję ostrzeżenie.\n{pamietaj} Pamiętaj że nasz serwer ma tylko jedno oficjalne zaproszenie.\n:anger_right: Wpisz `!zaproszenie` aby je otrzymać.");

                await Helpers.RemoveMessage(MessageToRemove, 5);

                var uslessmsg = await msg.Channel.SendMessageAsync(".");

                string reason        = "Reklamowanie innych serwerów discord.";
                var    administrator = Global.Client.CurrentUser;

                await ManagmentService.Warn(guild, uslessmsg, user, administrator, reason);
            }
        }