Files
SethDiscordBot/PluginManager/Others/Channels.cs
2022-01-07 20:26:10 +02:00

15 lines
563 B
C#

using Discord;
using System.Threading.Tasks;
namespace PluginManager.Others
{
public static class ChannelManagement
{
public static IGuildChannel GetTextChannel(this IGuild server, string name) => server.GetTextChannel(name);
public static IGuildChannel GetVoiceChannel(this IGuild server, string name) => server.GetVoiceChannel(name);
public static async Task<IDMChannel> GetDMChannel(IGuildUser user) => await user.CreateDMChannelAsync();
public static IChannel GetChannel(IMessage message) => message.Channel;
}
}