简体   繁体   English

Discord.py - 以用户身份发送消息(不是机器人)

[英]Discord.py - Send message as user (not bot)

I have for the moment a code that sends a message but only for my own discord server as a bot.我目前有一个发送消息的代码,但仅适用于我自己的 discord 服务器作为机器人。

What I would like it's automated sending message to others servers to simulate an activity as if it were my main account我希望它能自动向其他服务器发送消息以模拟活动,就好像它是我的主帐户一样

def sendMessage(ch, ms):
    client = discord.Client()

    @client.event
    async def on_ready():


        channel = client.get_channel(ch)
        await channel.send(ms)

        return ""

    client.run('token')

How to make the sendMessage code sending a message using my main account?如何让sendMessage代码使用我的主帐户发送消息?

Please, do not do this.请不要这样做。

Like Silvio said, if you find a way to send messages as a user through code and you are caught then you might get banned.就像 Silvio 所说的那样,如果您找到一种通过代码以用户身份发送消息的方法并且被抓到,那么您可能会被禁止。 Don't say we didn't warn you!别说我们没提醒你!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Discord.py Bot - 用户信息消息 - Discord.py Bot - User info message Discord.py bot - 如何让机器人在 DM 中向我发送用户的消息? - Discord.py bot - How to make a bot send user's message to me in DM? 为什么我的不和谐机器人不会在频道 discord.py 中发送消息 - Why will my discord bot not send a message in a channel discord.py Discord Bot 不发送特定消息 | discord.py - Discord Bot doesn't send specific message | discord.py Discord.py bot - 如果语句为真,则向 discord 服务器发送消息 - Discord.py bot - Send message to discord server if statement is true 是否可以让 discord.py 机器人在没有用户触发的情况下向用户发送私人消息? - Is it possible to make a discord.py bot send a private message to a user without user trigger? discord.py 如何让机器人在特定用户类型时发送消息? - discord.py how do I get a bot to send a message when a specific user types? discord.py 使机器人在用户开始流式传输时发送消息 - discord.py make bot send message when user starts streaming 每次具有特定角色的用户在任何频道发言时,如何让机器人发送消息 | Discord.py - How to have the bot send a message every time a user with a specific role speaks in any channel | Discord.py Discord.py 如何使用机器人将发送的消息? - Discord.py How to use the message that the bot WILL send?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM