Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[Bug] Webhook.send throws exception when channels mentioned #370

@aronson

Description

@aronson

What's the bug?

If you have text mentioning a channel in a webhook send the library will throw an exception.

How do we reproduce it?

Run this, replacing values as appropriate:

import {
  Webhook,
} from 'https://raw.githubusercontent.com/harmonyland/harmony/main/mod.ts';

const webhookURL = "[REDACTED]";

const webhook = await Webhook.fromURL(webhookURL);
const text = "Time to test if <#1144768702856831016> and <@229468578720645124> and <@466378653216014359> and <#1144768732858687539> make it through";

try {
  await webhook.send(text);
} catch (e) {
  console.log(e);
}

What should have happened?

It should not throw an exception.

What is actually happening?

It throws an exception.

What versions you're using?

  • OS: Ubuntu 22.04 x86_64, macOS 14.1 ARM64
  • Deno: 1.37.2
  • Harmony: main branch as of right now

Do you have anything to tell us more about the bug?

It still sends the message.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug 🐛Something isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions