# Discord等级提升神器—代码开源

By [sykey](https://paragraph.com/@sykey) · 2022-03-19

---

重要说明： 本人不对使用机器人后造成的任何后果负责！！！

本人不对使用机器人后造成的任何后果负责！！！

本人不对使用机器人后造成的任何后果负责！！！

本人不提供手把手教学辅助，Python 3代码都很简单，都是很基础的东西google搜下都能解决。如果实在是不太懂，可以提供手把手教学，请赏杯奶茶等等觉得你觉得对得起给你提供的价值。

以下是代码： import requests import time import json import random

Discord机器人使用说明
==============

xxxxxxxxxxx：是频道ID，支持多个频道
========================

bbbbbbbbbbbbb：是账号Token，支持多个账号同时聊天
=================================

23行的hi是发送的内容，随意更改
=================

发送消息后会立即删除，所以最好掺杂一些手动聊天的记录
==========================

def chat(): chanel\_list = \['xxxxxxxxxxx','xxxxxxxxxxx','xxxxxxxxxxx'\] authorization\_list = \['bbbbbbbbbbbbb','bbbbbbbbbbbbb'\] for authorization in authorization\_list: header = { "Authorization": authorization, "Content-Type": "application/json", "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.4606.61 Safari/537.36" } for chanel\_id in chanel\_list: msg = { "content": "hi", "nonce": "82329451214{}33232234".format(random.randrange(0, 1000)), "tts": False } url = '[https://discord.com/api/v9/channels/{}/messages](https://discord.com/api/v9/channels/%7B%7D/messages)'.format(chanel\_id) try: res = requests.post(url=url, headers=header,data=json.dumps(msg)) print(res.text) idMsg = json.loads(res.text)\['id'\] url1 = '[https://discord.com/api/v9/channels/{}/messages/{}](https://discord.com/api/v9/channels/%7B%7D/messages/%7B%7D)'.format(chanel\_id, idMsg) requests.delete(url=url1, headers=header) except Exception: print(Exception) continue # 取30秒到50之间的一个随机数，作为循环的间隔时间。 time.sleep(random.randrange(30, 50))

if **name** == '**main**': while True: try: print('start') chat() # 取180秒到240之间的一个随机数，作为机器人发送消息的间隔时间。 sleeptime = random.randrange(180, 240) time.sleep(sleeptime) except: pass continue

---

*Originally published on [sykey](https://paragraph.com/@sykey/discord)*
