Exemple #1
0
        public async Task <IDiscordMessage> SendMessageAsync(
            string content,
            bool isTTS         = false,
            DiscordEmbed embed = null)
        {
            var permissions = await GetPermissionsAsync();

            if (!permissions.HasFlag(GuildPermission.SendMessages))
            {
                throw new UnauthorizedAccessException();
            }

            return(await DiscordChannelHelper.CreateMessageAsync(
                       client,
                       packet,
                       new MessageArgs(content, embed, isTTS)));
        }
Exemple #2
0
 public async Task <IDiscordMessage> SendMessageAsync(
     string content, bool isTTS = false, DiscordEmbed embed = null)
 => await DiscordChannelHelper.CreateMessageAsync(
     client, packet, new MessageArgs(content, embed, isTTS));