Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Keyword Argument "name" seems to have no affect #28

Closed
Column01 opened this issue Aug 10, 2020 · 2 comments
Closed

Keyword Argument "name" seems to have no affect #28

Column01 opened this issue Aug 10, 2020 · 2 comments

Comments

@Column01
Copy link

Here I have some code that should be setting the hook's name using the keyword arguments, but for some reason the name remains unchanged.

Python Version: 3.6.9 and tested on 3.8.0
Discord Webhook version: discord-webhook==0.8.0 (from pypi)

def post_to_webhook(self, gist_url, report_time):
    logging.info("Posting the gist to the webhook...")
    # Make a new webhook
    webhook = DiscordWebhook(url=self.webhook_url, name=self.server)
    # Create and embed and set time stamp for the embed, add it to the webhook and execute it.
    embed = DiscordEmbed(title="{} crashed!".format(self.server), description="Read the report here: {}".format(gist_url))
    embed.set_timestamp(report_time)
    webhook.add_embed(embed)
    return webhook.execute()

And as you can see below, the embed has self.server filled appropriately, but the webhook's name does not change.
Example Image of Webhook in Discord

@Column01
Copy link
Author

Wait. I'm dumb, it's username Will try that in a sec here

@Column01
Copy link
Author

Yup, it was user error! Sorry to bother you.

Thanks for your work on this library 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant