public static async Task ChangeNickName(DiscordSocketClient client, SocketCommandContext context) { // Change Nick Name 💎 // Get the Home Assistant Server Guild ulong serverGuild = (ulong)AppSettingsUtil.AppSettingsLong("serverGuild", true, 330944238910963714); var guild = client.GetGuild(serverGuild); if (null == guild) { return; } var user = guild.GetUser(context.User.Id); if (user.Nickname.Contains("🔹")) { await user.ModifyAsync( x => { string newNick = user.Nickname.Replace("🔹", string.Empty); x.Nickname = newNick; } ); } }
public static SocketGuild ServerGuild(SocketCommandContext context) { ulong serverGuild = (ulong)AppSettingsUtil.AppSettingsLong("serverGuild", true, 330944238910963714); return(context.Client.GetGuild(serverGuild)); }
public static ITextChannel BotSpamChannel(SocketCommandContext context) { ulong botspamChannelId = (ulong)AppSettingsUtil.AppSettingsLong("botspamChannel", true, 331106174722113548); return(context.Client.GetChannel(botspamChannelId) as ITextChannel); }
public static ITextChannel ModLogChannel(SocketCommandContext context) { ulong modlogChannelId = (ulong)AppSettingsUtil.AppSettingsLong("modlogChannel", true, 473590680103419943); return(context.Client.GetChannel(modlogChannelId) as ITextChannel); }
public static ITextChannel ModChannel(SocketCommandContext context) { ulong modChannelId = (ulong)AppSettingsUtil.AppSettingsLong("modChannel", true, 330948240805462026); return(context.Client.GetChannel(modChannelId) as ITextChannel); }