FORBIDDEN (status code: 403) Can't send messages to this user

前端 未结 1 564
春和景丽
春和景丽 2020-12-12 05:29

I want to make a command that will send a DM to the entire server, but I am getting the following error:

Forbidden: FORBIDDEN (status code: 403) Can\'t send          


        
相关标签:
1条回答
  • 2020-12-12 05:47

    The user might have blocked your bot or disabled DMs for your server, either way, you won’t be able to salvage the situation, so simply dropping the exception will do.

    try:
      /* send message */
    except Exception: 
      pass
    
    0 讨论(0)
提交回复
热议问题