test

swadhinbiswas committed 2 years ago
c08eb2b
1 parent ae296b8
commit c08eb2b
3 files changed
+52 -16
▼GithubfetchBot/command.py
+6-0
1
+from discord.ext import commands
2
+import discord
3
+import os
4
+
5
+def get_git():
6
+ bot=commands.Bot(command_prefix="/")
0
7
▼GithubfetchBot/logging.py
+46-0
1
+from logging.config import dictConfig
2
+
3
+LOGGING_CONFIG = {
4
+ "version": 1,
5
+ "disable_existing_loggers": False,
6
+ "formatters": {
7
+ "verbose": {
8
+ "format": "%(asctime)s : %(name)-10s - %(levelname)s -%(module)-15s : %(message)s"
9
+ }
10
+ },
11
+
12
+ 'handlers': {
13
+ "console": {
14
+ "level": "DEBUG",
15
+ "class": "logging.StreamHandler",
16
+ "formatter": "simple"},
17
+
18
+ "console2": {
19
+ "level": "Warning",
20
+ "class": "logging.StreamHandler",
21
+ "formatter": "simple"},
22
+
23
+ "file": {
24
+ 'level': 'INFO',
25
+ 'class': 'logging.FileHandler',
26
+ 'filename': 'logs.log',
27
+ 'mode': 'w',
28
+
29
+ },
30
+
31
+ },
32
+
33
+ "loggers": {
34
+ "bot": {
35
+
36
+ 'handlers': ['handlers'],
37
+ "level": "INFO",
38
+ "propagate": False,
39
+ },
40
+ "discord": {
41
+ 'handlers': ['console2', 'file'],
42
+ 'level': 'INFO',
43
+ 'propagate': False,
44
+ },
45
+ },
46
+}
0
47
▼GithubfetchBot/responces.py
+0-16
1
-from random import choice, randint
2
-
3
-def get_responce(user_input:str)->str:
4
- lower:str=user_input.lower()
5
-
6
- if lower=="help":
7
- return "This is a help message"
8
- elif lower=="about":
9
- return "This is a about message"
10
- elif lower=="roll":
11
- return str(randint(1,6))
12
- elif lower=="":
13
- return "Well you\'ve got to say something"
14
- else:
15
- return "I don't understand the command"
16
-
17
0