SinisterRectus / Discordia

Discord API library written in Lua for the Luvit runtime environment
MIT License
697 stars 143 forks source link

Getting a guild based on guild id #334

Closed FFranker closed 2 years ago

FFranker commented 2 years ago

I'm trying to get a specific guild with guild id. I have tried this so far but it seems to be ineffective;

for guild in pairs(client.guilds.cache) do print(guild.name) end

object-Object commented 2 years ago

You're looking for client:getGuild(id), documented here. Also, the best way to get help with your code is to join the Discord API or Discordia servers, rather than opening an issue on GitHub.

FFranker commented 2 years ago

Alright thanks.