質問編集履歴
1
pyファイル追記
test
CHANGED
File without changes
|
test
CHANGED
@@ -17,7 +17,23 @@
|
|
17
17
|
(venv) % python discord.py
|
18
18
|
2022-09-21 17:12:13 INFO discord.client logging in using static token
|
19
19
|
2022-09-21 17:12:14 INFO discord.gateway Shard ID None has connected to Gateway (Session ID: xxxxxxxxxxxxxxxxxxxxxxxxx).
|
20
|
-
|
21
20
|
```
|
22
21
|
|
22
|
+
```discord.py
|
23
|
+
import discord
|
24
|
+
from discord.ext import commands
|
25
|
+
from discord.ext import tasks
|
23
26
|
|
27
|
+
bot = commands.Bot(command_prefix="/",intents=discord.Intents.all())
|
28
|
+
|
29
|
+
|
30
|
+
@bot.command()
|
31
|
+
async def sakura(ctx):
|
32
|
+
channel_sent = bot.get_channel(1012237139729197256)
|
33
|
+
await channel_sent.send("はじめて")
|
34
|
+
|
35
|
+
|
36
|
+
token = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxx'
|
37
|
+
bot.run(token)
|
38
|
+
```
|
39
|
+
|