def send_webhook(webhook_type, site, profile, task_id, image_url): if settings.webhook != "": print("Here in send_webhook") webhook = DiscordWebhook(url=settings.webhook, username="******", avatar_url="https://i.imgur.com/60G42xE.png") if webhook_type == "OP": if not settings.webhook_on_order: return embed = DiscordEmbed(title="Order Placed", color=0x34c693) elif webhook_type == "B": if not settings.webhook_on_browser: return embed = DiscordEmbed( title="Added to cart, complete order in browser", color=0xf2a689) elif webhook_type == "PF": if not settings.webhook_on_failed: return embed = DiscordEmbed(title="Payment Failed", color=0xfc5151) embed.set_footer(text="Rashed - Auto Bot", icon_url="https://i.imgur.com/60G42xE.png") embed.add_embed_field(name="Site", value=site, inline=True) embed.add_embed_field(name="Profile", value=profile, inline=True) embed.add_embed_field(name="Task ID", value=task_id, inline=True) embed.set_thumbnail(url=image_url) webhook.add_embed(embed) try: webhook.execute() except Exception as e: print(e) pass
def send_webhook(webhook_type, site, profile, task_id, image_url): if settings.webhook != "": webhook = DiscordWebhook(url=settings.webhook, username="******", avatar_url="https://i.imgur.com/fy26LbM.png") if webhook_type == "OP": if not settings.webhook_on_order: return embed = DiscordEmbed(title="Order Placed", color=0x34c693) elif webhook_type == "B": if not settings.webhook_on_browser: return embed = DiscordEmbed(title="Complete Order in Browser", color=0xf2a689) elif webhook_type == "PF": if not settings.webhook_on_failed: return embed = DiscordEmbed(title="Payment Failed", color=0xfc5151) embed.set_footer(text="Via Bird Bot", icon_url="https://i.imgur.com/fy26LbM.png") embed.add_embed_field(name="Site", value=site, inline=True) embed.add_embed_field(name="Profile", value=profile, inline=True) embed.add_embed_field(name="Task ID", value=task_id, inline=True) embed.set_thumbnail(url=image_url) webhook.add_embed(embed) try: webhook.execute() except: pass
def send_webhook2(webhook_type, site, profile, url): if settings.webhook != "": webhook = DiscordWebhook( url=settings.webhook, username="******", avatar_url="https://i.imgur.com/fy26LbM.png", ) if webhook_type == "AD": if not settings.webhook_on_order: return embed = DiscordEmbed(title="Added To Cart", color=0x34C693) embed.set_footer(text="Via Bird Bot", icon_url="https://i.imgur.com/fy26LbM.png") embed.add_embed_field(name="Site", value=site, inline=True) embed.add_embed_field(name="Profile", value=profile, inline=True) embed.add_embed_field(name="URL", value=url, inline=True) # embed.set_thumbnail(url=image_url) webhook.add_embed(embed) try: webhook.execute() except: pass