Giter Club home page Giter Club logo

Comments (7)

Misha-133 avatar Misha-133 commented on June 10, 2024 1

Ah. Well we don't do that because it's extremely easy to get ratelimited this way. We don't think the lib should silently do such
a thing (that also might be unnecessary for some users) so we leave this up to the user.

from discord.net.

Misha-133 avatar Misha-133 commented on June 10, 2024

That is not a bug.
And no, it's not possible to fetch the old message data after it's been updated. The only way to achieve this - have a local cache of messages; dnet does exactly that, it stores N messages for each channel to in-ram cache (the N amount is configured in the DiscordSocketConfig by setting the MessageCacheSize). And since it's stored in the ram - it is cleared upon bot restarts.

from discord.net.

Taelyn avatar Taelyn commented on June 10, 2024

Thats why Discord.JS can do it :) Even on a bot restart when the cache is cleared.
Kinda weird that this is the ONLY library that cant do it.

Tried DSharpPlus and there it works, so its clearly an issue in this library
Even Discord Devs confirmed its possible

from discord.net.

Misha-133 avatar Misha-133 commented on June 10, 2024

I'm not aware how other libraries implement caching.
Could you quote or at least name the "Discord Dev" who told you it is possible so I could contact them about this?

from discord.net.

Taelyn avatar Taelyn commented on June 10, 2024

I guess they build it in there library, something Discord.Net does not have it seems, what is weird :)
Anyway builded my own cache to fetch messages on ShardReady and this solves it.

Will look for the quote

from discord.net.

Taelyn avatar Taelyn commented on June 10, 2024

I understand that, however we have a strong need of this due to the size of the community and what the bot should do for us.
I keep the message size low and see how it affects

from discord.net.

SylveonDeko avatar SylveonDeko commented on June 10, 2024

Then make your own cache? Use redis?

from discord.net.

Related Issues (20)

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.