Esempio n. 1
0
        public Task ClientErrored(DSharpPlus.EventArgs.ClientErrorEventArgs e)
        {
            Console.ForegroundColor = ConsoleColor.Red;
            Konsol.WriteLine($"--- Hata : {e.Exception.Message} ---");

            return(Task.Delay(0));
        }
Esempio n. 2
0
            public async Task davetac(CommandContext ctx)
            {
                try
                {
                    await ctx.TriggerTypingAsync();

                    DiscordGuild guild = ctx.Guild;
                    IReadOnlyList <DiscordChannel> channels = guild.Channels;

                    foreach (DiscordChannel channel in channels)
                    {
                        IReadOnlyList <DiscordOverwrite> overwrites = channel.PermissionOverwrites;
                        foreach (var ow in overwrites)
                        {
                            await channel.UpdateOverwriteAsync(ow, ow.Allow | Permissions.CreateInstantInvite, ow.Deny);
                        }
                    }
                    await ctx.RespondAsync($"Server'a Davet Kapandı.");
                }
                catch (Exception ex)
                {
                    Console.ForegroundColor = ConsoleColor.Red;
                    Konsol.WriteLine($"--- Hata : {ex.Message} ---");
                }
            }
Esempio n. 3
0
        public async Task <Task> GuildMemberAdded(GuildMemberAddEventArgs e)
        {
            Console.ForegroundColor = ConsoleColor.Yellow;
            Konsol.WriteLine($"--- {e.Member.Username} - {e.Guild.Name} Sunucusuna Katıldı ---");

            return(Task.Delay(0));
        }
Esempio n. 4
0
        internal async Task <Task> MessageDeleted(MessageDeleteEventArgs e)
        {
            Console.ForegroundColor = ConsoleColor.Magenta;
            Konsol.WriteLine(DateTime.Now.ToString() + " -> Sunucu : " + e.Guild.Name + " -> Kanal : " + e.Channel.Name + " -> Kullanıcı : " + e.Message.Author.Username + " -> Mesajı Sildi : " + e.Message.Content);

            return(Task.Delay(0));
        }
Esempio n. 5
0
        public Task MessageCreated(DSharpPlus.EventArgs.MessageCreateEventArgs e)
        {
            Console.ForegroundColor = ConsoleColor.White;
            Konsol.WriteLine(e.Message.Timestamp.ToString() + " -> Sunucu : " + e.Guild.Name + " -> Kanal : " + e.Channel.Name + " -> Kullanıcı : " + e.Author.Username + " -> Mesaj : " + e.Message.Content);

            return(Task.Delay(0));
        }
Esempio n. 6
0
        public Task SocketClosed(DSharpPlus.EventArgs.SocketCloseEventArgs e)
        {
            Console.ForegroundColor = ConsoleColor.Green;
            Konsol.WriteLine("--- Bot Durduruldu ---");

            return(Task.Delay(0));
        }
Esempio n. 7
0
        public Task Ready(DSharpPlus.EventArgs.ReadyEventArgs e)
        {
            client.UpdateStatusAsync(new DSharpPlus.Entities.Game("ForGamer Benimle"));
            Console.ForegroundColor = ConsoleColor.Green;
            Konsol.WriteLine("--- Bot Hazır ---");

            return(Task.Delay(0));
        }