Getting Started¶
Python Requirements¶
Python 3.8 or newer is required.
Dependencies¶
The only dependency is discord.py.
Warning
discord.py versions from v2.4 are no longer compatible with the library
Installing¶
$ python -m pip install -U aiointeractions
$ py -m pip install -U aiointeractions
Example¶
main.py¶
1import asyncio
2import discord
3import aiointeractions
4
5intents = discord.Intents.none()
6# intents are not required because there is no gateway connection
7
8client = discord.Client(intents=intents)
9tree = discord.app_commands.CommandTree(client)
10app = aiointeractions.InteractionsApp(client)
11
12discord.utils.setup_logging(root=True)
13
14@tree.command()
15async def ping(interaction: discord.Interaction) -> None:
16 await interaction.response.send_message('Pong!')
17
18app.run('bot token')
Fork Support¶
While some forks may be compatible, discord.py forks will not be supported.