tripleS-Dev commited on
Commit
d28008c
1 Parent(s): 8c33a68
Files changed (1) hide show
  1. bot.py +20 -6
bot.py CHANGED
@@ -1,5 +1,5 @@
1
  import os
2
-
3
  import discord
4
  from discord.ext import commands
5
  from discord import app_commands
@@ -7,6 +7,8 @@ import funtion
7
  import cosmo2hex
8
  from typing import Optional
9
  import typing
 
 
10
 
11
  tree_guild = 1207625911709597737
12
 
@@ -47,9 +49,21 @@ async def collect(interaction: discord.Interaction, name: str, count: Optional[i
47
 
48
 
49
 
50
- toker = os.getenv['super_cosmo']
51
-
52
- if toker:
53
  client.run(toker)
54
- else:
55
- client.run('MTIzMzY5MzE1NzU2NTM5OTA5MA.Guap9W.MEtVVH4k2__M9pocPl_5CBw3mPP54a8y_4vCQs')
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  import os
2
+ import threading
3
  import discord
4
  from discord.ext import commands
5
  from discord import app_commands
 
7
  import cosmo2hex
8
  from typing import Optional
9
  import typing
10
+ import gradio as gr
11
+
12
 
13
  tree_guild = 1207625911709597737
14
 
 
49
 
50
 
51
 
52
+ def run():
53
+ toker = os.getenv['super_cosmo']
 
54
  client.run(toker)
55
+
56
+ def greet(name):
57
+ return "Hello " + name + "!"
58
+
59
+ demo = gr.Interface(fn=greet, inputs="textbox", outputs="textbox")
60
+
61
+ if __name__ == "__main__":
62
+ t1 = threading.Thread(target=demo.launch)
63
+ t2 = threading.Thread(target=run)
64
+
65
+ t1.start()
66
+ t2.start()
67
+
68
+ t1.join()
69
+ t2.join()