Discord.net: No way to get guild from message/channel

Created on 24 Apr 2017  路  5Comments  路  Source: discord-net/Discord.Net

I'm trying to make a chat logger for my self bot, but I cant find an efficient way to get the guild a message/channel belongs to, is there one? Can one be added? Is it not added for a reason?

I'd highly appreciate it if someone could answer my questions.

PS: using 1.0 forgot to mention

EDIT: I found the endpoint its part of the JSON returned for channel objects https://mix1337.gyazo.com/1d6f2d63c2f4ff3bbc7dbc8626a367ed

Most helpful comment

var chnl = message.Channel as SocketGuildChannel;
var Guild = chnl.Guild.Name;

Does that answer your question?

All 5 comments

var chnl = message.Channel as SocketGuildChannel;
var Guild = chnl.Guild.Name;

Does that answer your question?

Thanks, if an admin could close the issue

You can close your own issues. Click the 'close issue' button.

Also, consider joining D.net discord channel. https://discord.gg/discord-api

Didn't know about close issue I'm new to github, also I'm already in the api discord I just never really get help I just get called an idiot or something along those lines

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Kwoth picture Kwoth  路  8Comments

xXBuilderBXx picture xXBuilderBXx  路  4Comments

tacitusxo picture tacitusxo  路  4Comments

TheBlue-1 picture TheBlue-1  路  3Comments

ThePademelon picture ThePademelon  路  7Comments