Skip to content

Instantly share code, notes, and snippets.

@KiroMusic
Created July 25, 2019 15:18
Show Gist options
  • Save KiroMusic/51162bb2bb68d7e1f65467e635f801d3 to your computer and use it in GitHub Desktop.
Save KiroMusic/51162bb2bb68d7e1f65467e635f801d3 to your computer and use it in GitHub Desktop.
[Command("host")]
public async Task addhost(SocketGuildUser user)
{
var account = GuildAccounts.GetAccount(Context.Guild.Id);
if (account.hostlist.Contains(Context.User.Id))
{
account.hostlist.Add(user.Id);
GuildAccounts.SaveAccounts();
var embed = new EmbedBuilder();
embed.WithTitle("Success!!");
embed.WithColor(okcolor);
embed.WithDescription($"{user.Mention} is now a host! Welcome!");
await Context.Channel.SendMessageAsync("", false, embed.Build());
}
else
{
await Context.Channel.SendMessageAsync($"{Program.Client.GetGuild(81680075119931392).Emotes.FirstOrDefault(x => x.Name == "xmark")}You aren't a host!");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment