mirror of
https://github.com/norohind/EDMC-FCTracker.git
synced 2025-06-04 01:20:57 +03:00
Extend Embed class with set_footer method to set footer for single embed
This commit is contained in:
parent
e834bf9153
commit
b621821c4e
8
load.py
8
load.py
@ -92,6 +92,8 @@ class Embed:
|
||||
self.add_item(**kwargs)
|
||||
|
||||
def add_item(self, **kwargs):
|
||||
"""Add item to the embed"""
|
||||
|
||||
color = kwargs.get('color')
|
||||
title = kwargs.get('title')
|
||||
description = kwargs.get('description')
|
||||
@ -118,9 +120,13 @@ class Embed:
|
||||
self.items[item][key] = self.items[item][key] + new_value
|
||||
|
||||
def set_username(self, username):
|
||||
"""Will override current webhook username, for reset call this func with None"""
|
||||
"""Will override current webhook username, for reset, call this func with None"""
|
||||
self.username = username
|
||||
|
||||
def set_footer(self, text, icon_url=None, item=0):
|
||||
"""Set footer to single embed"""
|
||||
self.items[item].update(footer=dict(text=text, icon_url=icon_url))
|
||||
|
||||
|
||||
class Messages_sender(threading.Thread):
|
||||
"""Sending embed message to discord "asynchronously" """
|
||||
|
Loading…
x
Reference in New Issue
Block a user