Skip to content

Emoji

Emoji

Class to get a random emoji from a list of emojis

Source code in src/project/database/Emoji.py
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
class Emoji:
    """Class to get a random emoji from a list of emojis
    """

    def __init__(self):
        """Constructor to initialize the list of emojis
        """
        self.emojis = [
            "๐Ÿ˜€", "๐Ÿ˜ƒ", "๐Ÿ˜„", "๐Ÿ˜", "๐Ÿ˜†", "๐Ÿ˜…", "๐Ÿ˜‚", "๐Ÿคฃ", "๐Ÿ˜Š", "๐Ÿ˜‡",
            "๐Ÿ™‚", "๐Ÿ™ƒ", "๐Ÿ˜‰", "๐Ÿ˜Œ", "๐Ÿ˜", "๐Ÿฅฐ", "๐Ÿ˜˜", "๐Ÿ˜—", "๐Ÿ˜™", "๐Ÿ˜š",
            "๐Ÿ˜‹", "๐Ÿ˜›", "๐Ÿ˜œ", "๐Ÿคช", "๐Ÿ˜", "๐Ÿค‘", "๐Ÿค—", "๐Ÿคญ", "๐Ÿคซ", "๐Ÿค”",
            "๐Ÿค", "๐Ÿคจ", "๐Ÿ˜", "๐Ÿ˜‘", "๐Ÿ˜ถ", "๐Ÿ˜", "๐Ÿ˜’", "๐Ÿ™„", "๐Ÿ˜ฌ", "๐Ÿ˜ฎ",
            "๐Ÿ˜ฏ", "๐Ÿ˜ณ", "๐Ÿคฏ", "๐Ÿ˜ฐ", "๐Ÿ˜จ", "๐Ÿ˜ฃ", "๐Ÿ˜ข", "๐Ÿ˜ญ", "๐Ÿ˜ฑ", "๐Ÿ˜–",
            "๐Ÿ˜•", "๐Ÿ˜”", "๐Ÿ˜ž", "๐Ÿ˜Ÿ", "๐Ÿ˜ค", "๐Ÿ˜ข", "๐Ÿ˜ญ", "๐Ÿ˜ฆ", "๐Ÿ˜ง", "๐Ÿ˜จ",
            "๐Ÿ˜ฉ", "๐Ÿคฏ", "๐Ÿ˜ฌ", "๐Ÿ˜ฐ", "๐Ÿ˜ฑ", "๐Ÿ˜ณ", "๐Ÿคช", "๐Ÿ˜ต", "๐Ÿฅด", "๐Ÿ˜ ",
            "๐Ÿ˜ก", "๐Ÿคฌ", "๐Ÿ˜ท", "๐Ÿค’", "๐Ÿค•", "๐Ÿคข", "๐Ÿคฎ", "๐Ÿคง", "๐Ÿ˜‡", "๐Ÿค ",
            "๐Ÿคก", "๐Ÿฅณ", "๐Ÿฅด", "๐Ÿฅบ", "๐Ÿคฅ", "๐Ÿคซ", "๐Ÿคญ", "๐Ÿง", "๐Ÿค“", "๐Ÿ˜ˆ",
            "๐Ÿ‘ฟ", "๐Ÿ‘น", "๐Ÿ‘บ", "๐Ÿ’€", "๐Ÿ‘ป", "๐Ÿ‘ฝ", "๐Ÿ‘พ", "๐Ÿค–", "๐Ÿ’ฉ", "๐Ÿ˜บ",
            "๐Ÿ˜ธ", "๐Ÿ˜น", "๐Ÿ˜ป", "๐Ÿ˜ผ", "๐Ÿ˜ฝ", "๐Ÿ™€", "๐Ÿ˜ฟ", "๐Ÿ˜พ"
        ]

    def get_random_emoji(self):
        """Method to get a random emoji from the list

        Returns:
            str: Random emoji from the list
        """
        return random.choice(self.emojis)
__init__()

Constructor to initialize the list of emojis

Source code in src/project/database/Emoji.py
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
def __init__(self):
    """Constructor to initialize the list of emojis
    """
    self.emojis = [
        "๐Ÿ˜€", "๐Ÿ˜ƒ", "๐Ÿ˜„", "๐Ÿ˜", "๐Ÿ˜†", "๐Ÿ˜…", "๐Ÿ˜‚", "๐Ÿคฃ", "๐Ÿ˜Š", "๐Ÿ˜‡",
        "๐Ÿ™‚", "๐Ÿ™ƒ", "๐Ÿ˜‰", "๐Ÿ˜Œ", "๐Ÿ˜", "๐Ÿฅฐ", "๐Ÿ˜˜", "๐Ÿ˜—", "๐Ÿ˜™", "๐Ÿ˜š",
        "๐Ÿ˜‹", "๐Ÿ˜›", "๐Ÿ˜œ", "๐Ÿคช", "๐Ÿ˜", "๐Ÿค‘", "๐Ÿค—", "๐Ÿคญ", "๐Ÿคซ", "๐Ÿค”",
        "๐Ÿค", "๐Ÿคจ", "๐Ÿ˜", "๐Ÿ˜‘", "๐Ÿ˜ถ", "๐Ÿ˜", "๐Ÿ˜’", "๐Ÿ™„", "๐Ÿ˜ฌ", "๐Ÿ˜ฎ",
        "๐Ÿ˜ฏ", "๐Ÿ˜ณ", "๐Ÿคฏ", "๐Ÿ˜ฐ", "๐Ÿ˜จ", "๐Ÿ˜ฃ", "๐Ÿ˜ข", "๐Ÿ˜ญ", "๐Ÿ˜ฑ", "๐Ÿ˜–",
        "๐Ÿ˜•", "๐Ÿ˜”", "๐Ÿ˜ž", "๐Ÿ˜Ÿ", "๐Ÿ˜ค", "๐Ÿ˜ข", "๐Ÿ˜ญ", "๐Ÿ˜ฆ", "๐Ÿ˜ง", "๐Ÿ˜จ",
        "๐Ÿ˜ฉ", "๐Ÿคฏ", "๐Ÿ˜ฌ", "๐Ÿ˜ฐ", "๐Ÿ˜ฑ", "๐Ÿ˜ณ", "๐Ÿคช", "๐Ÿ˜ต", "๐Ÿฅด", "๐Ÿ˜ ",
        "๐Ÿ˜ก", "๐Ÿคฌ", "๐Ÿ˜ท", "๐Ÿค’", "๐Ÿค•", "๐Ÿคข", "๐Ÿคฎ", "๐Ÿคง", "๐Ÿ˜‡", "๐Ÿค ",
        "๐Ÿคก", "๐Ÿฅณ", "๐Ÿฅด", "๐Ÿฅบ", "๐Ÿคฅ", "๐Ÿคซ", "๐Ÿคญ", "๐Ÿง", "๐Ÿค“", "๐Ÿ˜ˆ",
        "๐Ÿ‘ฟ", "๐Ÿ‘น", "๐Ÿ‘บ", "๐Ÿ’€", "๐Ÿ‘ป", "๐Ÿ‘ฝ", "๐Ÿ‘พ", "๐Ÿค–", "๐Ÿ’ฉ", "๐Ÿ˜บ",
        "๐Ÿ˜ธ", "๐Ÿ˜น", "๐Ÿ˜ป", "๐Ÿ˜ผ", "๐Ÿ˜ฝ", "๐Ÿ™€", "๐Ÿ˜ฟ", "๐Ÿ˜พ"
    ]
get_random_emoji()

Method to get a random emoji from the list

Returns:

  • str โ€“

    Random emoji from the list

Source code in src/project/database/Emoji.py
25
26
27
28
29
30
31
def get_random_emoji(self):
    """Method to get a random emoji from the list

    Returns:
        str: Random emoji from the list
    """
    return random.choice(self.emojis)