You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Now let's get a basic bot going, for your code, you'll want something like this:
53
+
!!! note
54
+
This is a very basic bot. For a more detailed example/template bot that demonstrates many parts of interactions.py, see [the boilerplate repository.](https://github.com/interactions-py/boilerplate)
84
55
85
-
```python
86
-
from interactions import Client, Intents, listen
56
+
Now let's get a basic bot going, for your code, you'll want something like this:
87
57
88
-
bot = Client(intents=Intents.DEFAULT)
89
-
# intents are what events we want to receive from discord, `DEFAULT` is usually fine
58
+
```python
59
+
from interactions import Client, Intents, listen
90
60
91
-
@listen() # this decorator tells snek that it needs to listen for the corresponding event, and run this coroutine
92
-
async def on_ready():
93
-
# This event is called when the bot is ready to respond to commands
94
-
print("Ready")
95
-
print(f"This bot is owned by {bot.owner}")
61
+
bot = Client(intents=Intents.DEFAULT)
62
+
# intents are what events we want to receive from discord, `DEFAULT` is usually fine
96
63
64
+
@listen() # this decorator tells snek that it needs to listen for the corresponding event, and run this coroutine
65
+
asyncdefon_ready():
66
+
# This event is called when the bot is ready to respond to commands
67
+
print("Ready")
68
+
print(f"This bot is owned by {bot.owner}")
97
69
98
-
@listen()
99
-
async def on_message_create(event):
100
-
# This event is called when a message is sent in a channel the bot can see
0 commit comments