Coder Social home page Coder Social logo

panda's Introduction

tucu tuuuuu

panda's People

Contributors

fmeow avatar slooowandfurious avatar xyaman avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

panda's Issues

Any way to get HttpClient from outside of bot event handlers?

Is there any way to get an HttpClient for my bot except in the bot event handlers? I want to do this so that I can create a discord bridge to another chat application, which means that it needs to be able to send messages at arbitrary times, not triggered by discord events. Currently I see that you could wait for on_ready and set a mutable Option<Arc<SessionData<S>>> to Some(data.clone()), but is there any other way to do this?

Attachments not working?

Attachments don't seem to be working on_message_create. It always gives an empty Vec

client.on_message_create(|s, data| async move {
    if data.channel_id == CHANNEL {
        println!(
            "Message \"{}\" in {}\nattatchments: {:#?}",
            data.content, data.channel_id, data.attatchments
        );
    }
    Ok(())
});

EmbedImage and other need to be public

Hi,

When trying to add an image to an embed message, the function need a EmbedImage structure but this one is private (all are except the main Embed model).

Cheer.

Wrong argument type for `panda::client::Client::on_message_delete_bulk` ?

Tested with version 0.5.2 in crates.io.
The function panda::client::Client::on_message_delete_bulk seems to expect a wrong argument type : it waits for a function expecting a panda::events::MessageDelete structure but a panda::events::MessageDeleteBulk exists, so I'm wondering if the argument type is not wrong since it looks like a typo mistake. Moreover, the documentation says it "[sets] the handler for MessageDeleteBulk event".
Please, consider updating this function if I'm right.

How do I access update_status?

Hi,

I'm trying to use the function update_status but it can't seems to work.
I'm trying to get it from state or the session but since I'm using a custom one (see #1) maybe it's what posing problem here?

How to use async database in on_message_create

Hi,

First, thanks for the lib!

I got a little problem, I need to be able to access my database pool in on_message_create (and probably others) but I can't pass parameters to the function that is passed in it :

client.on_message_create(message_manage(pool); because it ask me to pass Session<()> and MessageCreate which are passed by default

async fn message_manage(s: Session<()>, msg: MessageCreate, pool: MysqlPool) -> HandlerResult {

How would you to it? Can I get Session and MessageCreate at this moment and pass them "manually"?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.