Discord.Net/docs/guides/entities/samples/socketentities.cs

11 lines
281 B
C#
Raw Normal View History

2024-06-12 22:43:59 -07:00
public string GetChannelTopic(ulong id)
{
var channel = client.GetChannel(81384956881809408) as SocketTextChannel;
return channel?.Topic;
}
public SocketGuildUser GetGuildOwner(SocketChannel channel)
{
var guild = (channel as SocketGuildChannel)?.Guild;
return guild?.Owner;
}