How big is the difference between xyz.cache.get() and await xzy.fetch()?

fetch returns the cached thing aswell if it exists, so except the Promise difference i see not really a problem with using await fetch all the time. Is this consider bad practise? & How big is the difference time & performancewise?
NP
Naryani Priya417d ago
Should be negligible in both terms and I don't think it's a bad practice... cause it will check from cache first and if not found in cache then it will fetch it(unless you are force fetching)
A
Ararou417d ago
in some scenarios you’ll better off using fetch like if so a member hasn’t send a msg or smth sometimes that isn’t in cache afaik anyway
C
chillihero416d ago
what is the „downside“ of using fetch? if there is one
A
Ararou415d ago
I haven’t had any issues with it from my usage
F
Favna415d ago
you cannot use fetch without async that can be an issue in some situations
Want results from more Discord servers?
Add your server
More Posts
NOT WORK SAPPHIREwhy not work bot commands?Throwing on unhandled interactionHey, I just wanted to quickly check this idea - If I assign a listener to interaction create and theReply During CooldownCan I make the bot reply with the remaining time of cooldown delay ?messageUpdate event not Triggering```ts import { Listener } from '@sapphire/framework'; import type { Message } from 'discord.js'; exp'"discord.js"' has no exported member named 'WebhookEditMessageOptions'. Did you mean 'WebhookFetchMError: '"discord.js"' has no exported member named 'WebhookEditMessageOptions'. Did you mean 'WebhooMonoreposDoes Sapphire work and play nice with monorepos?Question regarding slash commands / aliasesHi, is there a way for me to register command aliases as slash commands as well? For example: Commandisable commands by dashboard.I want to disable commands through dashboard so, is there any way to dynamically disable commands ?What is the difference between response.status and response.statusCode ?When using the API Plugin of Sapphire.Hey what is DEVELOPMENT MODE and how do I disable itI tried setting the Node_Env to something else but it did not change it in the consoleBotList Autopost of stats is not workingI am using the bot list plugin https://github.com/devtomio/sapphire-plugin-botlist I set everything Miss matching objects on permission setting.Typescript says that permissionOverwrites does not exits in GuildBasedChannel, even tho it exists, irequiredClientPermissions check always rejectingWhile `requiredUserPermissions: ['ManageRoles']` works great. The client check `requiredClientPermisUnable to get member data from users that have left / kickedHi, I am trying to get data from members who have left the discord server or have been kicked. But ICatch all chat input command errors listenerHello ! I tried using the `Events.ChatInputCommandError` listener to catch any errors thrown by the Multiple Clients on one file/instanceI was wondering if its possible to run multiple clients on one file (i.e. .forEach()-ing `new ClientHow to present Slashcommands?How can I present the Slashcommands of my bot in his About Me like for example carl.gg does?Interaction HandlersAm I required to specify to sapphire where my interaction handlers directory is? A `interaction-handbot won't get on and connect to discord.hi, my bot won't turn on. i've coded a lot of bots before with sapphire and they worked just fine, dHow Do I Make a Project in my current Directory?I want to make the proj in `workspaces/DashMate` not like `workspaces/DashMate/${ProjName}`