Rewrite all concepts documentation
hello RC documentation
This commit is contained in:
13
docs/guides/concepts/samples/entities.cs
Normal file
13
docs/guides/concepts/samples/entities.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
public string GetChannelTopic(ulong id)
|
||||
{
|
||||
var channel = client.GetChannel(81384956881809408) as SocketTextChannel;
|
||||
if (channel == null) return "";
|
||||
return channel.Topic;
|
||||
}
|
||||
|
||||
public string GuildOwner(SocketChannel channel)
|
||||
{
|
||||
var guild = (channel as SocketGuildChannel)?.Guild;
|
||||
if (guild == null) return "";
|
||||
return Context.Guild.Owner.Username;
|
||||
}
|
||||
Reference in New Issue
Block a user