File tree 7 files changed +61
-1
lines changed
7 files changed +61
-1
lines changed Original file line number Diff line number Diff line change
1
+ TOKEN = " Replace me with your bot token"
Original file line number Diff line number Diff line change
1
+ import os
2
+ from src import Glykon
3
+
4
+ if __name__ == "__main__" :
5
+
6
+ if not ".env" in os .listdir ():
7
+
8
+ print ("⇒ Running configurations" )
9
+
10
+ token = input ("🔴 paste your bot's token 🔴:" )
11
+ with open (".env" , "x" ) as f :
12
+ f .write (f"TOKEN='{ token } '" )
13
+
14
+ Glykon ().run ()
Original file line number Diff line number Diff line change 1
- disnake
1
+ disnake
2
+ python-dotenv
Original file line number Diff line number Diff line change
1
+ from .bot import Glykon
Original file line number Diff line number Diff line change
1
+ import os
2
+ from disnake import Intents
3
+ from disnake .ext .commands import (
4
+ Bot
5
+ )
6
+
7
+ from dotenv import load_dotenv
8
+ load_dotenv (dotenv_path = "./.env" )
9
+ TOKEN = os .getenv ("TOKEN" )
10
+
11
+ class Glykon (Bot ):
12
+ def __init__ (self ):
13
+ super ().__init__ (
14
+ command_prefix = "changeme" ,
15
+ case_insensitive = True ,
16
+ help_command = None , # type: ignore
17
+ intents = Intents .all ()
18
+ )
19
+
20
+ def loadCogs (self ) -> None :
21
+ for file in os .listdir ("./src/cogs" ):
22
+ if file .startswith ("_" ): continue
23
+ if not file .endswith ("py" ): self .load_extension (f"src.cogs.{ file } " )
24
+ self .load_extension (f"src.cogs.{ file [:- 3 ]} " )
25
+
26
+ async def on_ready (self ) -> None :
27
+ print (
28
+ f"""
29
+ ───── ⋆⋅☆⋅⋆ ─────
30
+ WELCOME TO { self .user .display_name }
31
+ ⤷ Servers 💿: { len (self .guilds )}
32
+ ⤷ Users 👥: { len (self .users )}
33
+ ⤷ Cogs ⚙️: { len (self .cogs )}
34
+ ───── ⋆⋅☆⋅⋆ ─────
35
+
36
+ Status: Ready 🟢
37
+ """
38
+ )
39
+
40
+
41
+ def run (self ) -> None :
42
+ self .loadCogs ()
43
+ super ().run (TOKEN , reconnect = True )
File renamed without changes.
You can’t perform that action at this time.
0 commit comments