How to operate Discord API with Python (bot registration)

I had to post to a DM or channel to a user using a bot on Discord, so I'll show you how. This time I will write without using disocrd.py.

Make sure you have Discord administrator privileges.

If not, get administrator privileges or You need to tell the administrator the URL that will be displayed at the end and have it added.

bot registration

Go to Discord developer page

https://discord.com/developers/applications

Click New Application

Group 9.png

Enter an arbitrary name on the CREATE AN APPLICATION screen and press CREATE.

1601620912.png

Since it will move to the General Information screen, select bot from the menu on the left

Group 10.png

Select "Add Bot".

Select Yes, do it! Without thinking about anything

Go to the OAuth2 menu and select Scope as a bot

Group 11.png

Check Send Message because the bot permissions checkbox sends a message

1601621522.png

Copy because the URL is generated in the SCOPE part

Group 11.png

If you paste the copied URL into a browser etc. and access it, the authentication screen will appear

Group 12.png Select a server and select "Yes" to add the bot to the server

Continue to API operation

Recommended Posts

How to operate Discord API with Python (bot registration)
Discord Bot with recording function starting with Python: (5) Directly operate the Discord API
I tried to operate Linux with Discord Bot
Python: How to use async with
Try to operate Facebook with Python
How to use OpenPose's Python API
How to use FTP with Python
How to calculate date with python
[Python] How to use Typetalk API
How to work with BigQuery in Python
How to do portmanteau test with python
How to display python Japanese with lolipop
How to enter Japanese with Python curses
[Python] How to deal with module errors
How to send a request to the DMM (FANZA) API with python
How to install python3 with docker centos
Create a bot to retweet coronavirus information
Steps to create a Twitter bot with python
[Note] How to create a Ruby development environment
I tried to operate Linux with Discord Bot
[Note] How to create a Mac development environment
How to operate Discord API with Python (bot registration)
How to make an artificial intelligence LINE bot with Flask + LINE Messaging API
How to upload with Heroku, Flask, Python, Git (4)
How to read a CSV file with Python 2/3
Discord bot with python raspberry pi zero with [Notes]
How to enjoy programming with Minecraft (Ruby, Python)
[REAPER] How to play with Reascript in Python
How to do multi-core parallel processing with python
Strategy on how to monetize with Python Java
How to implement Discord Slash Command in Python
[Python] How to draw multiple graphs with Matplotlib
[Python] How to read excel file with pandas
LINE BOT with Python + AWS Lambda + API Gateway
How to specify attributes with Mock of python
Steps to create a Twitter bot with python
How to measure execution time with Python Part 1
How to notify a Discord channel in Python
How to use tkinter with python in pyenv
[Python] How to handle Japanese characters with openCV
[Python] Mention to multiple people with Slack API
[Python] How to compare datetime with timezone added
How to measure execution time with Python Part 2
How to install Python
How to install python
Operate Kinesis with Python
Operate Blender with Python
How to operate NumPy
Operate Excel with Python (1)
Operate Excel with Python (2)
[BigQuery] How to use BigQuery API for Python -Table creation-
How to convert / restore a string with [] in python
How to add help to HDA (with Python script bonus)
[First API] Try to get Qiita articles with Python
[Python] How to draw a line graph with Matplotlib
How to scrape image data from flickr with python
How to do hash calculation with salt in Python
[Introduction to Python] How to iterate with the range function?
Discord Bot with recording function starting with Python: (3) Cooperation with Database
Discord Bot with recording function starting with Python: (1) Introduction discord.py
Explain in detail how to make sounds with python
How to upload with Heroku, Flask, Python, Git (Part 3)
How to run tests in bulk with Python unittest
Try to operate DB with Python and visualize with d3
How to measure mp3 file playback time with python
How to use python interactive mode with git bash