This is my code:
await message.member.timeout(spamTimeout, 'Recieved a timeout for exceeding max message limit.');
It gives me an error saying:
DiscordAPIError: Missing Permissions
But the bot is the owner of the guild so why would it not have permissions?
I fixed this myself, the problem was the member I was trying to timeout had ADMINISTRATOR, but you can't be timed out if you have ADMINISTRATOR.
Also I would just like to tell everyone that a bot can be the owner of a guild. Check guild.create();