getGuildOrNull

suspend fun getGuildOrNull(): Guild?(source)

Requests to get the guild this message was created in, if it was created in one, returns null if the Guild isn't present or the message was a DM.

Throws

if anything went wrong during the request.