python-discord-webhook icon indicating copy to clipboard operation
python-discord-webhook copied to clipboard

doubt webhook

Open jose89fcb opened this issue 2 years ago • 1 comments

Hi, I have a doubt how to share a bot with webhook to other servers and make the command work

it is that I programmed a bot with webhook and a command and I don't know how I can share it in other servers this is the code i use: https://github.com/jose89fcb/bot-discord-habbo-webhook/blob/main/habbo.py

Thank you!

jose89fcb avatar Aug 12 '22 03:08 jose89fcb

i don't understand what do you want exactly, if it's sending requests to several server you can use it like this:

discord_url = ["YOUR FIRST WEBHOOK URL", "YOUR SECOND WEBHOOK URL", "etc..."]
for URL in discord_url:
    webhook = DiscordWebhook(url=URL, username=f"{keko}", content=f"{mensaje}", avatar_url=f"https://www.habbo.es/habbo-imaging/avatarimage?user={keko}&action=none&direction=2&head_direction=2&gesture=std&size=l")
    response = webhook.execute()

mouadessalim avatar Aug 17 '22 14:08 mouadessalim