Sandushki / StarterDiscordBot

PYTHON PRO COURSE LESSON 3 -- I am ten years old, and for my Python course, I have started creating my first Discord bot!
1 stars 0 forks source link

Additional Bot Functions #2

Open Sandushki opened 6 months ago

Sandushki commented 6 months ago

Description

I have created some very, very basic functions that can used by my Discord bot. I have contained some snippets about those in this issue.

Sandushki commented 6 months ago

"Clear the Chat" function

I have created an additional function for my Discord bot to use. This function basically "clears the chat" because it sends a ton of empty lines using the U+3164 character. This way, you have to scroll up to see the previous messages. Below is the "code" for this function.

def temizle():
   temizleyici = "ㅤ\n"

   return(temizleyici*51)
Sandushki commented 6 months ago

"This Doesn't Exist" function

The "this does not exist" function is a function that returns most of my Discord bot commands as a list. It also does this in a complete sentence. The code is followed below.

def komutCikar():
    komutlar =("Her komut dolar ile başlamak üzere;\n\n    merhaba\n    görüşürüz\n    şifre oluştur\n    yazı tura\n    emoji\n\nolmak üzere,\nbüyük-küçük harflerin yazılımına dikkat edin.")

    return(komutlar)