fix
This commit is contained in:
1 parent
a317b0a7e8
commit
77256f3881
1 file changed
+8
-10
@@ -14,18 +14,18 @@ intents.message_content = True
|
||||
|
||||
bot = commands.Bot(command_prefix='!', intents=intents)
|
||||
|
||||
@bot.event
|
||||
async def on_ready():
|
||||
print(f'✅ {bot.user} is online!')
|
||||
|
||||
async def main():
|
||||
# ── telegram forwarder ───────────────────────────────────────────────
|
||||
forwarder = TelegramForwarder(
|
||||
forwarder = TelegramForwarder(
|
||||
token=os.getenv('TELEGRAM_BOT_TOKEN'),
|
||||
group_id=int(os.getenv('TELEGRAM_GROUP_ID')),
|
||||
webhook_url=os.getenv('DISCORD_WEBHOOK_URL'),
|
||||
)
|
||||
)
|
||||
|
||||
@bot.event
|
||||
async def on_ready():
|
||||
print(f'✅ {bot.user} is online!')
|
||||
asyncio.create_task(forwarder.start())
|
||||
|
||||
async def main():
|
||||
async with bot:
|
||||
await bot.load_extension('cogs.general')
|
||||
await bot.load_extension('cogs.chance')
|
||||
@@ -34,8 +34,6 @@ async def main():
|
||||
await bot.load_extension('cogs.sysinfo')
|
||||
await bot.load_extension('music.music')
|
||||
|
||||
await forwarder.start()
|
||||
|
||||
try:
|
||||
await bot.start(os.getenv('DISCORD_TOKEN'))
|
||||
finally:
|
||||
|
||||
Reference in new issue
Block a user