From 33e7687ad00a99089c4807915241201bf32fd93c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lvaro=20G=C3=B3mez=20Cuenca?= Date: Tue, 8 Dec 2020 05:52:19 +0100 Subject: [PATCH] Send message when startup --- Bot_Discord_CSharp/Bot.cs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Bot_Discord_CSharp/Bot.cs b/Bot_Discord_CSharp/Bot.cs index f66f183..605aa32 100644 --- a/Bot_Discord_CSharp/Bot.cs +++ b/Bot_Discord_CSharp/Bot.cs @@ -12,6 +12,7 @@ using Bot_Discord_CSharp.Commands; using Microsoft.Extensions.Logging; using DSharpPlus.Interactivity; using DSharpPlus.Interactivity.Extensions; +using DSharpPlus.Entities; namespace Bot_Discord_CSharp { @@ -76,9 +77,11 @@ namespace Bot_Discord_CSharp await Task.Delay(-1); } - private Task OnClientReady(DiscordClient client, ReadyEventArgs e) + private async Task OnClientReady(DiscordClient client, ReadyEventArgs e) { - return null; + DiscordGuild guild = await client.GetGuildAsync(732743391548407888, true); + DiscordChannel channel = guild.GetChannel(785719482924007424); + await channel.SendMessageAsync("Ya estoy de vuelta"); } private void RegisterCommands()