local changes
This commit is contained in:
1 parent
a317b0a7e8
commit
8ee7447ae9
21 files changed
+227
-175
No files matched your search
@@ -5,8 +5,6 @@ import os
|
||||
import logging
|
||||
import asyncio
|
||||
|
||||
from tgbridge.forwarder import TelegramForwarder
|
||||
|
||||
load_dotenv('credentials.env')
|
||||
|
||||
intents = discord.Intents.default()
|
||||
@@ -19,13 +17,6 @@ async def on_ready():
|
||||
print(f'✅ {bot.user} is online!')
|
||||
|
||||
async def main():
|
||||
# ── telegram forwarder ───────────────────────────────────────────────
|
||||
forwarder = TelegramForwarder(
|
||||
token=os.getenv('TELEGRAM_BOT_TOKEN'),
|
||||
group_id=int(os.getenv('TELEGRAM_GROUP_ID')),
|
||||
webhook_url=os.getenv('DISCORD_WEBHOOK_URL'),
|
||||
)
|
||||
|
||||
async with bot:
|
||||
await bot.load_extension('cogs.general')
|
||||
await bot.load_extension('cogs.chance')
|
||||
@@ -33,13 +24,7 @@ async def main():
|
||||
await bot.load_extension('cogs.copypasta')
|
||||
await bot.load_extension('cogs.sysinfo')
|
||||
await bot.load_extension('music.music')
|
||||
|
||||
await forwarder.start()
|
||||
|
||||
try:
|
||||
await bot.start(os.getenv('DISCORD_TOKEN'))
|
||||
finally:
|
||||
await forwarder.stop()
|
||||
await bot.start(os.getenv('DISCORD_TOKEN'))
|
||||
|
||||
logging.basicConfig(level=logging.INFO)
|
||||
asyncio.run(main())␍
|
||||
asyncio.run(main())
|
||||
Reference in new issue
Block a user