def send_embed(alert_type, link, fields, site, image, product): ''' (str, str, list, str, str, str) -> None Sends a discord alert based on info provided. ''' url = webhook embed = Webhook(url, color=123123) if (alert_type == "NEW_SHOPIFY"): desc = "NEW: " + product elif (alert_type == "RESTOCK_SHOPIFY"): desc = "RESTOCK: " + product embed.set_author( name='NERYS', icon='https://static.zerochan.net/Daenerys.Targaryen.full.2190849.jpg') embed.set_desc(desc) for field in fields: if (alert_type == "NEW_SHOPIFY" or alert_type == "RESTOCK_SHOPIFY"): cart_link = site + "/cart/" + str(field[1]) + ":1" embed.add_field(name=str(field[0]), value=cart_link) if (image is not None): embed.set_thumbnail(image) embed.set_image(image) embed.set_footer( text='NERYS by @snivynGOD', icon='https://static.zerochan.net/Daenerys.Targaryen.full.2190849.jpg', ts=True) embed.post()
def send_embed(link, fields, site, image, product, webhook): ''' (str, str, list, str, str, str) -> None Sends a discord alert based on info provided. ''' embed = Webhook(webhook, color=123123) #if(alert_type == "NEW_SHOPIFY"): desc = product #elif(alert_type == "RESTOCK_SHOPIFY"): #desc = "RESTOCK: " + product embed.set_author(name='coplitshoes', icon='') embed.set_desc(desc) for field in fields: #if(alert_type == "NEW_SHOPIFY" or alert_type == "RESTOCK_SHOPIFY"): cart_link = site + "/cart/" + str(field[1]) + ":1" embed.add_field(name=str(field[0]), value=cart_link) if (image is not None): embed.set_thumbnail(image) embed.set_image(image) embed.set_footer(text='coplitshoes', icon='', ts=True) embed.post()
def send_embed(alert_type, link, fields, site, image, product): ''' (str, str, list, str, str, str) -> None Sends a discord alert based on info provided. ''' url = webhook embed = Webhook(url, color=123123) if(alert_type == "NEW_SHOPIFY"): desc = "NEW: " + product elif(alert_type == "RESTOCK_SHOPIFY"): desc = "RESTOCK: " + product embed.set_author(name='StirFry', icon='https://pbs.twimg.com/profile_images/1086659064304676865/oX8NsFC-_400x400.jpg') embed.set_desc(desc) for field in fields: if(alert_type == "NEW_SHOPIFY" or alert_type == "RESTOCK_SHOPIFY"): cart_link = site + "/cart/" + str(field[1]) + ":1" embed.add_field(name=str(field[0]), value=cart_link) if(image is not None): embed.set_thumbnail(image) embed.set_image(image) embed.set_footer(text='StirFry', icon='https://pbs.twimg.com/profile_images/1086659064304676865/oX8NsFC-_400x400.jpg', ts=True) embed.post()
def send_embed(alert_type, product): ''' (str, str, list, str, str, str) -> None Sends a discord alert based on info provided. ''' # Set webhook url = https://discordapp.com/api/webhooks/555053278308859927/D1AsxzUajXuA3fchYuXwq_ib2OHW3S-UpNNYyYanoW7W2Eo9rBb-evVneSeRyPX_SOy7 # Create embed to send to webhook embed = Webhook(url, color=123123) # Set author info embed.set_author(name='NERYS', icon='https://static.zerochan.net/Daenerys.Targaryen.full.2190849.jpg') # Set product details if(alert_type == "RESTOCK"): embed.set_desc("RESTOCK: " + product.title) elif(alert_type == "NEW"): embed.set_desc("NEW: " + product.title) embed.add_field(name="Product", value=product.title) embed.add_field(name="Link", value=product.link) embed.add_field(name="Stock", value=str(product.stock)) # Set product image embed.set_thumbnail(product.image) embed.set_image(product.image) # Set footer embed.set_footer(text='NERYS by @snivynGOD', icon='https://static.zerochan.net/Daenerys.Targaryen.full.2190849.jpg', ts=True) # Send Discord alert embed.post()
def EmbedMsg(): global Author global AuthorID global Title global Banner global RankedLink global Length global BPM global GMFormat global GMFormat2 embed = Webhook(webhook, color=0x0098f9) embed.set_author(name='New {} map by {}'.format(GMFormat, Author), icon='https://a.ppy.sh/{}'.format(AuthorID), url='https://osu.ppy.sh/users/{}'.format(AuthorID)) embed.set_title(title='**__{}__**'.format(Title), url=RankedLink) embed.set_thumbnail(Banner) embed.set_desc("""**BPM:** {} **Song Length:** {} **Containing:** {} """.format(BPM, Length, GMFormat2)) embed.set_footer(text='Ranked!', ts=True, icon='https://hypercyte.s-ul.eu/W4GBjy0M') embed.post() NewRanked()
def post_to_webhook(self, slug): post = self.get_post_from_server(slug) msg_string = (post['body'][:250] + '...') if len(post['body']) > 250 else post['body'] embed = Webhook(HOOK_URL, color=123123) embed.set_author(name=post['title'], icon='https://cdn6.aptoide.com/imgs/5/1/f/51fc6f8666c50ce7456651810d7a4439_icon.png?w=240') embed.set_desc(msg_string) embed.add_field(name='Read more', value=post['url']) embed.post()
def sendWebhook(checkoutUrl, totaltime, method, productName, pictureurl, webhook): embed = Webhook(webhook, color=123123) embed.set_author(name='Checkout/Queue Bypass Link', url=checkoutUrl) embed.add_field(name='Product Name', value=productName) embed.add_field(name='Total Time', value=totaltime) embed.add_field(name='Created by', value="rycao18#3998") embed.add_field(name='Method', value=method) embed.set_thumbnail(pictureurl) embed.set_footer(text='RyZySply Bot - ' + str(time.strftime("%H:%M:%S")), icon='https://i.imgur.com/fG3Gu2Y.jpg', ts=True) embed.post()
def send_embed(alert_type, product): ''' (str, str, list, str, str, str) -> None Sends a discord alert based on info provided. ''' # Set webhook url = discord_webhook # Create embed to send to webhook # msg='@everyone' option making everyone msg method if (alert_type == "KNEW"): embed = Webhook(url, color=123123, msg='@everyone') else: embed = Webhook(url, color=123123) # Set author info embed.set_author( name='Mrporter', icon= 'https://previews.123rf.com/images/martialred/martialred1604/martialred160400080/55731598-%EB%A9%94%EC%8B%9C%EC%A7%80-%EC%95%B1%EA%B3%BC-%EC%9B%B9-%EC%82%AC%EC%9D%B4%ED%8A%B8%EC%97%90-%EB%8C%80%ED%95%9C-chatbot-%EC%B1%84%ED%8C%85-%EB%B4%87-%EB%98%90%EB%8A%94-%EC%B1%84%ED%84%B0-%EB%B4%87-%EB%9D%BC%EC%9D%B8-%EC%95%84%ED%8A%B8-%EC%95%84%EC%9D%B4%EC%BD%98.jpg' ) # Set product details if (alert_type == "RESTOCK"): embed.set_desc("RESTOCK: " + "title") elif (alert_type == "NEW"): embed.set_desc("NEW: " + product.name) elif (alert_type == "KNEW"): embed.set_desc("NEW: " + product.name) embed.add_field(name="Product", value=product.name) embed.add_field(name="Brand", value=product.brand) embed.add_field(name="Price", value=product.price) embed.add_field(name="Link", value=product.siteLik) #embed.add_field(name="ImgLink", value=product.link) # Set product image embed.set_thumbnail(product.link) embed.set_image(product.link) print(product.link) input() # Set footer embed.set_footer( text='Mrporter by @DevHong', icon='https://static.zerochan.net/Daenerys.Targaryen.full.2190849.jpg', ts=True) # Send Discord alert embed.post()
def send_embed(alert_type, product): ''' (str, str, list, str, str, str) -> None Sends a discord alert based on info provided. ''' # Set webhook url = discord_webhook # Create embed to send to webhook embed = Webhook(url, color=123123) # Set author info embed.set_author( name='Nike', icon= 'https://static-breeze.nike.co.kr/kr/ko_kr/cmsstatic/theme/52/android-icon-36x36.png' ) # Set product details if (alert_type == "RESTOCK"): embed.set_desc("RESTOCK: " + "title") elif (alert_type == "NEW"): embed.set_desc("NEW: " + product.title) # Name, Code, Color, Date, Price # Early Link # Time embed.add_field(name="Name", value=product.name) embed.add_field(name="Code", value=product.code) embed.add_field(name="Color", value=product.color) embed.add_field(name="Price", value=product.price) embed.add_field(name="Link", value=product.siteLink) embed.add_field(name="Time", value=product.pTime) embed.add_field(name="ImgLink", value=product.imgLink) # Set product image embed.set_thumbnail(product.imgLink) embed.set_image(product.imgLink) # Set footer embed.set_footer( text='Nike by @DevHong', icon= 'https://static-breeze.nike.co.kr/kr/ko_kr/cmsstatic/theme/52/android-icon-36x36.png', ts=True) # Send Discord alert embed.post()
def send_embed(product): ''' (Product) -> None Sends a discord alert based on info provided. ''' url = 'WEBHOOK HERE' embed = Webhook(url, color=42320) embed.set_author(name='MY-Monitor') embed.set_desc("Found product based on keyword " + product.keyword) embed.add_field(name="Link", value=product.link) embed.set_footer(text='by keem#0815, Notify Beta', ts=True) embed.post()
def send_embed(product): ''' (Product) -> None Sends a discord alert based on info provided. ''' url = 'https://discordapp.com/api/webhooks/532298624114229268/pgNC5uyKSNOzitqRbm60E7G9p-fcjzhwHsss1biNP9TuxwbqNJbdj5y9HDtISSsf4yCc' embed = Webhook(url, color=123123) embed.set_author(name='NERYS', icon='https://static.zerochan.net/Daenerys.Targaryen.full.2190849.jpg') embed.set_desc("Found product based on keyword " + product.keyword) embed.add_field(name="Link", value=product.link) embed.set_footer(text='NERYS by @snivynGOD', icon='https://static.zerochan.net/Daenerys.Targaryen.full.2190849.jpg', ts=True) embed.post()
def send_embed(product): ''' (Product) -> None Sends a discord alert based on info provided. ''' url = 'https://discordapp.com/api/webhooks/479049758254825472/kmK_bdEZ_bH_fmDoGJ_rS2AB1Xedn2CHwiviMhzGbaxZ9ES5U8nTCorV6qQnRVd12mp_' embed = Webhook(url, color=123123) embed.set_author(name='Premier Cooks', icon='https://pbs.twimg.com/profile_images/1031725580075585536/s0GlPWIB_400x400.jpg') embed.set_desc("Found product based on keyword " + product.keyword) embed.add_field(name="Link", value=product.link) embed.set_footer(text='Nike Monitor by @PremierCooks', icon='https://pbs.twimg.com/profile_images/1031725580075585536/s0GlPWIB_400x400.jpg', ts=True) embed.post()
def send_embed(product): ''' (Product) -> None Sends a discord alert based on info provided. ''' url = 'INSERT YOUR WEBHOOK HERE' embed = Webhook(url, color=123123) embed.set_author(name='NERYS', icon='https://static.zerochan.net/Daenerys.Targaryen.full.2190849.jpg') embed.set_desc("Found product based on keyword " + product.keyword) embed.add_field(name="Link", value=product.link) embed.set_footer(text='NERYS by @snivynGOD', icon='https://static.zerochan.net/Daenerys.Targaryen.full.2190849.jpg', ts=True) embed.post()
def send_embed(product): ''' (Product) -> None Sends a discord alert based on info provided. ''' url = "https://discord.com/api/webhooks/811178312336277504/ekKQ7L_aSJSbBWRiD7xH9PrcjeibAIG6P-KhMkVCLWDggsgzRSqSljNPQKPFkFSm69Mj" embed = Webhook(url, color=123123) embed.set_author(name='NERYS', icon='https://static.zerochan.net/Daenerys.Targaryen.full.2190849.jpg') embed.set_desc("Found product based on keyword " + product.keyword) embed.add_field(name="Link", value=product.link) embed.set_footer(text='NERYS by @snivynGOD', icon='https://static.zerochan.net/Daenerys.Targaryen.full.2190849.jpg', ts=True) embed.post()
def main(argv): global changelist_icon webhook_url = P4_COMMITS_WEBHOOK_URL change = -1 discord_userid = '-1' # Retrieve input arguments try: opts, args = getopt.getopt(argv, "tc:") except getopt.GetoptError: print( "Invalid arguments! -c ChangeNumber -t (to use TEST_WEBHOOK_URL)") sys.exit(2) for opt, arg in opts: if opt == '-c': change = arg if opt == '-t': webhook_url = TEST_WEBHOOK_URL # If no change was given, simply exit if change == -1: print("No change number supplied!") sys.exit(3) # Function will get description and user info about this change and store in a dictionary change_data = get_change_data(change, P4PORT, P4LOGIN, P4PASS) # Match Perforce user from perforce change info to actual Discord user using pre-set dictionaries discord_userid = discord_userids[change_data["user"]] discord_username = discord_usernames[change_data['user']] # Set up and send the embed embed_title = u'Change %s \u2022 %s (%s) \u2022 %s' % ( change, change_data['user'], discord_username, change_data['client']) embed_description = '%s' % (change_data['desc']) message = Webhook(webhook_url, color=0x10b1df) message.set_author( name=embed_title, icon=changelist_icon ) # Author field is used for smaller/more compact font and inline icon message.set_desc(embed_description) message.post()
def Run(): time.sleep(5) print('偵測') artdata = np.load('artdata.npy').item() for lists in data['Item']: for user in lists['Users']: try: arts = pixiv.user(user).works() Userinfo = pixiv.user(user).User() except Exception as e: loginPixiv() continue for art in arts: try: if artdata[user] == art.id: break except Exception: pass embed = Webhook(lists['WebhookURL'], color=123123) embed.set_author( name=Userinfo['name'], url='https://www.pixiv.net/member.php?id=' + user, icon=UrlReplace( Userinfo['profile_image_urls']['px_50x50'])) embed.set_image(UrlReplace(art.image)) embed.set_title(title=art.title, url=art.link) if not art.tags == None: Tag = '' for tags in art.tags: Tag = Tag + tags + '、' embed.add_field(name='標籤(Tags)', value=Tag[:-1]) Tag = '' if not art.caption == None: embed.set_desc(art.caption) embed.set_footer(text=strmd, icon="https://i.imgur.com/UNPFf1f.jpg", ts=True) embed.post() artdata[user] = arts[0].id np.save('artdata.npy', artdata)
def send_embed(alert_type, product): ''' (str, str, list, str, str, str) -> None Sends a discord alert based on info provided. ''' # Set webhook url = webhook_url #url = 'https://discordapp.com/api/webhooks/481411222118465550/8TanFM9unt2Ztf_ySUGlus9MNw9DVDaTKNXAQZpMYvtnoucHevzCYn0gjwV_ZpQmKsTQ' # Create embed to send to webhook embed = Webhook(url, color=123123) # Set author info embed.set_author( name='Mrporter', icon= 'https://previews.123rf.com/images/martialred/martialred1604/martialred160400080/55731598-%EB%A9%94%EC%8B%9C%EC%A7%80-%EC%95%B1%EA%B3%BC-%EC%9B%B9-%EC%82%AC%EC%9D%B4%ED%8A%B8%EC%97%90-%EB%8C%80%ED%95%9C-chatbot-%EC%B1%84%ED%8C%85-%EB%B4%87-%EB%98%90%EB%8A%94-%EC%B1%84%ED%84%B0-%EB%B4%87-%EB%9D%BC%EC%9D%B8-%EC%95%84%ED%8A%B8-%EC%95%84%EC%9D%B4%EC%BD%98.jpg' ) # Set product details if (alert_type == "RESTOCK"): embed.set_desc("RESTOCK: " + "title") elif (alert_type == "NEW"): embed.set_desc("NEW: " + product.name) embed.add_field(name="Product", value=product.name) embed.add_field(name="Brand", value=product.brand) embed.add_field(name="Price", value=product.price) embed.add_field(name="Link", value=product.siteLik) embed.add_field(name="ImgLink", value=product.link) # Set product image #embed.set_thumbnail('https://cache.mrporter.com/images/products/1054353/1054353_mrp_fr_l.jpg') #embed.set_image(product.link) # Set footer embed.set_footer( text='Mrporter by @DevHong', icon='https://static.zerochan.net/Daenerys.Targaryen.full.2190849.jpg', ts=True) # Send Discord alert embed.post()
def send_embed(alert_type, product): ''' (str, str, list, str, str, str) -> None Sends a discord alert based on info provided. ''' # Set webhook url = discord_webhook # Create embed to send to webhook embed = Webhook(url, color=123123) # Set author info embed.set_author( name='Premier Cooks', icon= 'https://pbs.twimg.com/profile_images/1031725580075585536/s0GlPWIB_400x400.jpg' ) # Set product details if (alert_type == "RESTOCK"): embed.set_desc("RESTOCK: " + product.title) elif (alert_type == "NEW"): embed.set_desc("NEW: " + product.title) embed.add_field(name="Product", value=product.title) embed.add_field(name="Link", value=product.link) embed.add_field(name="Stock", value=str(product.stock)) # Set product image embed.set_thumbnail(product.image) embed.set_image(product.image) # Set footer embed.set_footer( text='Supreme Monitor by @premiercooks', icon= 'https://pbs.twimg.com/profile_images/1031725580075585536/s0GlPWIB_400x400.jpg', ts=True) # Send Discord alert embed.post()
def send_embed(alert_type, product): url = discord_webhook embed = Webhook(url, color=123123) embed.set_author(name='ARB', icon='https://sun9-74.userapi.com/impf/x8e2VAfW-ao86OPcoUeSKpB7sup-dlIC3bT-2g/I3Vwk9su7D8.jpg?size=564x532&quality=96&sign=423037df9ddf5c5400c93844710086c3&type=album') if(alert_type == "RESTOCK"): embed.set_desc("RESTOCK: " + product.title) elif(alert_type == "NEW"): embed.set_desc("NEW: " + product.title) embed.add_field(name="Product", value=product.title) embed.add_field(name="Link", value=product.link) embed.add_field(name="Stock", value=str(product.stock)) # Set product image embed.set_thumbnail(product.image) embed.set_image(product.image) # Set footer embed.set_footer(text='ARB by @JaqueFresco', icon='https://sun9-11.userapi.com/impf/DagUwT61wIcd0BeLtPOI3UFtf2nV2ZK9Gh-8NQ/ehNPfNbLWGA.jpg?size=754x750&quality=96&sign=ce4bfc72ef8fdcfbbf3c11dbd8589382&type=album', ts=True) # Send Discord alert embed.post()
def send_embed(product): url = 'https://discordapp.com/api/webhooks/818881746308169749/TB7nvYzt6A4ZwJPEJzGFVzuRKpYRHR61Ka329pMCwWyF4fFwpV4Lt2lCdy1y8FljjkGz' embed = Webhook(url, color=123123) embed.set_author( name='ARB', icon= 'https://sun9-74.userapi.com/impf/x8e2VAfW-ao86OPcoUeSKpB7sup-dlIC3bT-2g/I3Vwk9su7D8.jpg?size=564x532&quality=96&sign=423037df9ddf5c5400c93844710086c3&type=album' ) embed.set_desc("Found product based on keyword " + product.keyword) embed.add_field(name="Link", value=product.link) embed.set_footer( text='ARB by @JaqueFresco', icon= 'https://sun9-11.userapi.com/impf/DagUwT61wIcd0BeLtPOI3UFtf2nV2ZK9Gh-8NQ/ehNPfNbLWGA.jpg?size=754x750&quality=96&sign=ce4bfc72ef8fdcfbbf3c11dbd8589382&type=album', ts=True) embed.post()
def send_embed(alert_type, product): ''' (str, str, list, str, str, str) -> None Sends a discord alert based on info provided. ''' # Set webhook url = discord_webhook # Create embed to send to webhook embed = Webhook(url, color=123123) # Set author info embed.set_author( name='NERYS', icon='https://static.zerochan.net/Daenerys.Targaryen.full.2190849.jpg') # Set product details if (alert_type == "RESTOCK"): embed.set_desc("RESTOCK: " + product.title) elif (alert_type == "NEW"): embed.set_desc("NEW: " + product.title) embed.add_field(name="Product", value=product.title) embed.add_field(name="Link", value=product.link) embed.add_field(name="Stock", value=str(product.stock)) # Set product image embed.set_thumbnail(product.image) embed.set_image(product.image) # Set footer embed.set_footer( text='NERYS by @snivynGOD', icon='https://static.zerochan.net/Daenerys.Targaryen.full.2190849.jpg', ts=True) # Send Discord alert embed.post()
def send_embed(alert_type, link, fields, site, image, product): ''' (str, str, list, str, str, str) -> None Sends a discord alert based on info provided. ''' url = webhook embed = Webhook(url, color=123123) if (alert_type == "NEW_SHOPIFY"): desc = "NEW: " + product elif (alert_type == "RESTOCK_SHOPIFY"): desc = "RESTOCK: " + product embed.set_author( name='ARB', icon= 'https://sun9-74.userapi.com/impf/x8e2VAfW-ao86OPcoUeSKpB7sup-dlIC3bT-2g/I3Vwk9su7D8.jpg?size=564x532&quality=96&sign=423037df9ddf5c5400c93844710086c3&type=album' ) embed.set_desc(desc) for field in fields: if (alert_type == "NEW_SHOPIFY" or alert_type == "RESTOCK_SHOPIFY"): cart_link = site + "/cart/" + str(field[1]) + ":1" embed.add_field(name=str(field[0]), value=cart_link) if (image is not None): embed.set_thumbnail(image) embed.set_image(image) embed.set_footer( text='ARB by @JaqueFresco', icon= 'https://sun9-11.userapi.com/impf/DagUwT61wIcd0BeLtPOI3UFtf2nV2ZK9Gh-8NQ/ehNPfNbLWGA.jpg?size=754x750&quality=96&sign=ce4bfc72ef8fdcfbbf3c11dbd8589382&type=album', ts=True) embed.post()
def send_embed(product): ''' (Product) -> None Sends a discord alert based on info provided. ''' url = 'https://discordapp.com/api/webhooks/539724977209999370/WhJDAUZX1AqV6WagfJ8PEVIV9FiLjpYrh2zIP6eLu8794S4QF3etmqE22JBVQsn3auPl' embed = Webhook(url, color=123123) embed.set_author( name='NERYS', icon='https://static.zerochan.net/Daenerys.Targaryen.full.2190849.jpg') embed.set_desc("Found product based on keyword " + product.keyword) embed.add_field(name="Link", value=product.link) embed.set_footer( text='NERYS by @snivynGOD', icon='https://static.zerochan.net/Daenerys.Targaryen.full.2190849.jpg', ts=True) embed.post()
def send_embed(product): ''' (Product) -> None Sends a discord alert based on info provided. ''' url = 'https://discordapp.com/api/webhooks/587167482788446210/rWMXZRqEthmb8TZvWIM5MPYytAEkqVPEfmaTs1hu0cQ98qaBKFyg6Wxivk8tMonh9zJO' embed = Webhook(url, color=123123) embed.set_author( name='NERYS', icon='https://static.zerochan.net/Daenerys.Targaryen.full.2190849.jpg') embed.set_desc("Found product based on keyword " + product.keyword) embed.add_field(name="Link", value=product.link) embed.set_footer( text='NERYS by @snivynGOD', icon='https://static.zerochan.net/Daenerys.Targaryen.full.2190849.jpg', ts=True) embed.post()
def send_embed(product): ''' (Product) -> None Sends a discord alert based on info provided. ''' url = 'https://discordapp.com/api/webhooks/467639983512092682/LSRvJNEmNPI4ZBF-Qt0NHcVVmQNRsBwE_3hdJVMDX-kSaNEEU-8UB-nt-yxU5m7n5Qw6' embed = Webhook(url, color=123123) embed.set_author( name='NERYS', icon='https://static.zerochan.net/Daenerys.Targaryen.full.2190849.jpg') embed.set_desc("Found product based on keyword " + product.keyword) embed.add_field(name="Link", value=product.link) embed.set_footer( text='NERYS by @snivynGOD', icon='https://static.zerochan.net/Daenerys.Targaryen.full.2190849.jpg', ts=True) embed.post()
def send_embed(product): ''' (Product) -> None Sends a discord alert based on info provided. ''' url = 'https://discordapp.com/api/webhooks/609541516377194508/nJqkl98mdg9SvlF0pIZmJ-YY8EePCwQdfLJ-4oB4WJj3WR6Ve0LpzFZGHcOLrvDyxrAT' embed = Webhook(url, color=123123) embed.set_author( name='NERYS', icon='https://static.zerochan.net/Daenerys.Targaryen.full.2190849.jpg') embed.set_desc("Found product based on keyword " + product.keyword) embed.add_field(name="Link", value=product.link) embed.set_footer( text='NERYS by @snivynGOD', icon='https://static.zerochan.net/Daenerys.Targaryen.full.2190849.jpg', ts=True) embed.post()
def send_embed(product): ''' (Product) -> None Sends a discord alert based on info provided. ''' url = 'https://discordapp.com/api/webhooks/555053278308859927/D1AsxzUajXuA3fchYuXwq_ib2OHW3S-UpNNYyYanoW7W2Eo9rBb-evVneSeRyPX_SOy7' embed = Webhook(url, color=123123) embed.set_author( name='NERYS', icon='https://static.zerochan.net/Daenerys.Targaryen.full.2190849.jpg') embed.set_desc("Found product based on keyword " + product.keyword) embed.add_field(name="Link", value=product.link) embed.set_footer( text='NERYS by @snivynGOD', icon='https://static.zerochan.net/Daenerys.Targaryen.full.2190849.jpg', ts=True) embed.post()
def send_embed(product): ''' (Product) -> None Sends a discord alert based on info provided. ''' url = 'https://discordapp.com/api/webhooks/481411222118465550/8TanFM9unt2Ztf_ySUGlus9MNw9DVDaTKNXAQZpMYvtnoucHevzCYn0gjwV_ZpQmKsTQ' embed = Webhook(url, color=123123) embed.set_author( name='NERYS', icon='https://static.zerochan.net/Daenerys.Targaryen.full.2190849.jpg') embed.set_desc("Found product based on keyword " + product.keyword) embed.add_field(name="Link", value=product.link) embed.set_footer( text='NERYS by @snivynGOD', icon='https://static.zerochan.net/Daenerys.Targaryen.full.2190849.jpg', ts=True) embed.post()
def send_embed(product): ''' (Product) -> None Sends a discord alert based on info provided. ''' url = 'https://discord.com/api/webhooks/728820147346997278/ocPnHwKHaeCLeq1N1UJ7nAmO1qvat3sxr2G5xv72TubAGZWmhajDzknK9CfR6ZpvxA2i' embed = Webhook(url, color=123123) embed.set_author( name='NERYS', icon='https://static.zerochan.net/Daenerys.Targaryen.full.2190849.jpg') embed.set_desc("Found product based on keyword " + product.keyword) embed.add_field(name="Link", value=product.link) embed.set_footer( text='NERYS by @snivynGOD', icon='https://static.zerochan.net/Daenerys.Targaryen.full.2190849.jpg', ts=True) embed.post()
class cRaidclear(): def __init__(self, date=datetime.datetime.now().strftime("%d/%m/%Y")): self.bosses = {} self.date = date self.placeholder_icon = "<:FeelsDeadMan:446396105077424138>" self.iconmap = {"Vale Guardian": "<:vale_guardian:449838205701718016>", "Gorseval": "<:gorseval:449838206179868672>", "Sabetha": "<:sabetha:449838205118971909>", "Slothasor": "<:sloth:449838206045913098>", "Matthias": "<:matthias:449838206054170645>", "Keep Construct": "<:keep_construct:449838205731340290>", "Xera": "<:xera:449838206100176896>", "Cairn": "<:cairn:449838199523639307>", "Mursaat Overseer": "<:mursaat_overseer:449838206310023168>", "Samarog":"<:samarog:449838206205296650>", "Deimos": "<:deimos:449838200295391232> ", "Soulless Horror": "<:soulless_horror:449838201943621632>", "Dhuum":"<:dhuum:449838200999903232>"} self.iconmap2 = {"Vale Guardian": "<:vale_guardian:449831911993507850>", "Gorseval": "<:gorseval:449831912190771210>", "Sabetha": "<:sabetha:449831912006221824>", "Slothasor": "<:sloth:449831912064679946>", "Matthias": "<:matthias:449831912177926144>", "Keep Construct": "<:keep_construct:449831911674740737>", "Xera": "<:xera:449831911754432513>", "Cairn": "<:cairn:449831905186283551>", "Mursaat Overseer": "<:mursaat_overseer:449831912123400204>", "Samarog":"<:samarog:449831912526315520>", "Deimos": "<:deimos:449831906188591114>", "Soulless Horror": "<:soulless_horror:449831907509796878>", "Dhuum":"<:dhuum:449831907530899476>"} #{"hook_url1":} self.hook_url1 = "" #this is the testserver self.hook_url2 = "" # this is the dps report channel self.hook_url = self.hook_url2 self.embed = Webhook(self.hook_url, color=0x483768) self.embed.set_desc("__***[Meta] Raid Run on "+self.date+"***__") self.embed.set_thumbnail("https://wiki.guildwars2.com/images/9/9d/Epidemic.png") self.embed.set_footer(text="Participants: Some people", ts=False) def set_bosses(self, bosses): """bosses is a dict that containts the bosses + links """ self.bosses = bosses def add_bossfields(self): for key in self.bosses.keys(): self.embed.add_field(name=self.iconmap.get(key, self.placeholder_icon)+key, value="[dps.report]("+self.bosses[key]+" \""+self.bosses[key]+"\")") def post_to_discord(self): #self.embed.set_desc("I am a descriptive description describing in a descriptive way.") self.embed.set_author(name="Chrononono") self.embed.post() def test_message(self): test_message = self.embed test_message.add_field(name="This is a test!", value="Nothing to see here") test_message.set_desc("A very inconspicuous message") test_message.set_author(name="Rogue AI") test_message.set_footer(text="This is the last test, I promise!", ts=False) test_message.post()