Resource [Discord Bot] Verify premium resource purchase

Discussion in 'Spigot Plugin Development' started by SnowGears, Jul 11, 2021.

  1. What if I have multiple premium resources?
     
  2. invite multiple bots, each of them will check for a specific resource
     
    • Funny Funny x 1
  3. wtf.
     
  4. what's wrong with that lmao
     
  5. Inviting multiple bots is very annoying XD
     
  6. Suggest anything better.
     
  7. I have this planned! It would be super easy to modify the code to check for specific ids and assign specific permissions if you want to customize it for now!
     
  8. Thank you! i will wait.
     
  9. I just added support for multiple premium resources/multiple discord roles and also added an option for sending PMs to discord admins on the server when someone trys to verify purchases.

    [​IMG]
     
    • Like Like x 2
  10. I getting error AttributeError: 'NoneType' object has no attribute 'split' What i should do?
     
    #30 chochoco4777, Aug 15, 2021
    Last edited: Aug 15, 2021
  11. Did you update the variables in the .env file? I added new ones in the update.
     
  12. what update?
     
  13. Please post the full error
     
  14. Im using host.
    Code (Text):
    16.08 10:39:56 [Bot] Startup Traceback (most recent call last):
    16.08 10:39:56 [Bot] Startup File "/verifybot.py", line 310, in <module>
    16.08 10:39:56 [Bot] Startup client.run(DISCORD_TOKEN)
    16.08 10:39:56 [Bot] Startup File "/.local/lib/python3.9/site-packages/discord/client.py", line 723, in run
    16.08 10:39:56 [Bot] Startup return future.result()
    16.08 10:39:56 [Bot] Startup File "/.local/lib/python3.9/site-packages/discord/client.py", line 702, in runner
    16.08 10:39:56 [Bot] Startup await self.start(*args, **kwargs)
    16.08 10:39:56 [Bot] Startup File "/.local/lib/python3.9/site-packages/discord/client.py", line 666, in start
    16.08 10:39:56 [Bot] Startup await self.connect(reconnect=reconnect)
    16.08 10:39:56 [Bot] Startup File "/.local/lib/python3.9/site-packages/discord/client.py", line 601, in connect
    16.08 10:39:56 [Bot] Startup raise PrivilegedIntentsRequired(exc.shard_id) from None
    16.08 10:39:56 [Bot] Startup discord.errors.PrivilegedIntentsRequired: Shard ID None is requesting privileged intents that have not been explicitly enabled in the developer portal. It is recommended to go to https://discord.com/developers/applications/ and explicitly enable the privileged intents within your application's page. If this is not possible, then consider disabling the privileged intents instead.
    16.08 10:39:56 [PebbleHost] Server shut down (running)
    16.08 10:39:56 [PebbleHost] Server stopped
    I don't know what to do.
     
    #37 chochoco4777, Aug 16, 2021
    Last edited: Aug 16, 2021
  15. You need to grant your bot the correct permissions in Oauth and make sure your bot on your server has permissions to assign roles: https://discord.com/developers/docs/topics/gateway#privileged-intents