import asyncio
from bot import GravityBot
import discord

class FakeChannel:
    async def send(self, embed, view=None):
        print("Sent to channel successfully!")
        class FakeMsg:
            id = 999
        return FakeMsg()

async def test():
    bot = GravityBot(asyncio.Queue())
    bot.project_channels["gravity_control"] = FakeChannel()
    class FakeHub:
        def get_active_count(self, proj): return 1
    bot.hub = FakeHub()
    await bot._hub_on_pending("gravity_control", {
        "request_id": "test1",
        "command": "Running1 command",
        "description": "test",
        "step_type": "",
        "buttons": [{"text": "Proceed", "index": 0}],
        "timestamp": 12345678.0
    })

asyncio.run(test())
