public async Task Notify()
        {
            var status = await _synthbotWebClient.GetDiscordUserStatus(Context.User.Id.ToString());

            await ReplyAsync("", false, EmbedFactory.Notifications.NotifyState(Context, status));

            var userResponse = await NextMessageAsync();

            if (userResponse != null)
            {
                DiscordUserStatus newStatus = default;
                if (userResponse.Content.ToLower() == "yes")
                {
                    newStatus = DiscordUserStatus.RegisteredWithNotify;
                }
                else if (userResponse.Content.ToLower() == "no")
                {
                    newStatus = DiscordUserStatus.RegisteredWithoutNotify;
                }

                if (newStatus != default)
                {
                    await _synthbotWebClient.SetDiscordUserStatus(Context.User.Id.ToString(), newStatus);
                }

                await ReplyAsync("", false, EmbedFactory.Notifications.NotifyUpdate(Context, newStatus, userResponse.Content));
            }
        }
Ejemplo n.º 2
0
        public async Task GetUserStatus()
        {
            var userId = Context.User.Id.ToString();
            var status = await _synthbotWebClient.GetDiscordUserStatus(userId);

            await ReplyAsync($"Status: {status.GetDescription()}");
        }
 private async Task <DiscordUserStatus> GetDiscordUserStatus(ulong discordUserId)
 {
     return(await _synthbotRestClient.GetDiscordUserStatus(discordUserId.ToString()));
 }