Created
July 25, 2019 15:18
-
-
Save KiroMusic/51162bb2bb68d7e1f65467e635f801d3 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[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