Skip to content

topgg.endpoint doesn't work #70

Description

@Hype3808

topgg.endpoint doesn't work.

Expected Behavior

printing topgg.types.BotVoteData

Current Behavior

No error raised. Nothing happened and printed

Development Environment

Python Version: 3.8.12
topggpy version: Master

Steps to Reproduce

# callback.py
@topgg.endpoint("/dbl", topgg.WebhookType.BOT, 'bizon_webhook1531')
def dbl_vote(data: topgg.types.BotVoteData, client: discord.Client=topgg.data(discord.Client)):
    print(data)
# main.py
# This is a subclass of commands.AutoShardedBot

class Bot(commands.AutoShardedBot):
    def __init__(self):
        super().__init__(...)
        self.webhook_menager = topgg.WebhookManager()
        self.webhook_menager.set_data(self)
        self.webhook_menager.endpoint(dbl_vote)
        self.loop.run_until_complete(self.webhook_menager.start(10000))

    async def on_ready(self):
        if self.webhook_menager.is_running:
            print("TopGG webhook is running!")
        else:
            await self.webhook_menager.start(10000)

image

Context

Possible Solution

Detailed Description

Possible Implementation

Notes

Could be my problem, could be not.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions