SHARE
TWEET

Untitled

a guest Jul 19th, 2019 52 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. public async Task Demo(IVoiceChannel channel = null)
  2.         {
  3.             channel = channel ?? (Context.Message.Author as IGuildUser)?.VoiceChannel;
  4.             if (channel == null)
  5.             {
  6.                 var embed = new EmbedBuilder()
  7.                     .AddField(fb => fb.WithName(GetText("created_at")).WithValue($"-").WithIsInline(true))
  8.                     .WithColor(NadekoBot.OkColor);
  9.                 await Context.Channel.EmbedAsync(embed).ConfigureAwait(false);
  10.             }
  11.             else
  12.             {
  13.                 var embed = new EmbedBuilder()
  14.                     .AddField(fb => fb.WithName(GetText("created_at")).WithValue($"https://discordapp.com/channels/"+Context.Guild.Id+"/"+channel.Id).WithIsInline(true))
  15.                     .WithColor(NadekoBot.OkColor);
  16.                 await Context.Channel.EmbedAsync(embed).ConfigureAwait(false);
  17.             }
  18.         }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top