Hey, for one, here's some code.
// Get a server ID based on channel ID // Note: this is being used in commands function getServerID(channelID) { bot.channels[channelID].guild_id; } function getServerName(serverID) { // ?? }
Basically, I have my bot log certain commands (e.g. Admin commands). It currently only logs the server ID it was ran in (e.g. User JohnDoe3042 ran command !ping in server 000000000000000000) and I thought it would be better if it also logged the name of the server (e.g. User JohnDoe3042 ran command !ping in server "foobar hangout" (000000000000000000)), because who wants to copy a ton of server ids to see which one the command was ran in?
Hey, for one, here's some code.
// Get a server ID based on channel ID // Note: this is being used in commands function getServerID(channelID) { bot.channels[channelID].guild_id; } function getServerName(serverID) { // ?? }
Basically, I have my bot log certain commands (e.g. Admin commands). It currently only logs the server ID it was ran in (e.g. User JohnDoe3042 ran command !ping in server 000000000000000000) and I thought it would be better if it also logged the name of the server (e.g. User JohnDoe3042 ran command !ping in server "foobar hangout" (000000000000000000)), because who wants to copy a ton of server ids to see which one the command was ran in?