#(solenopsis) Database usage
22 messages · Page 1 of 1 (latest)
(solenopsis) Database usage
Hi I'm AutoThreadBot! Don't mind me, I'll just be adding the helper team to this thread so they can see it. A human will get to you soon.
!xyproblem
Your question seems to be an XY Problem - you're asking about your attempted solution rather than your original problem.
Read in detail about the XY Problem here: http://xyproblem.info/
For an example of an XY Problem we've seen in Denizen, the question "how do I make an event for when a flag expires" has no answer, but the same question asked with full background detail will be something more like "I have this script: [LINK HERE], which sets a 3 minute cooldown flag on a player for when they use an ability. I want the player to be notified when the cooldown completes - how do I do this?" which we can then answer quite effectively (in this example, all that was needed was a simple wait command, no events or flag-listening or anything).
I want to know how to use database for storing text and there isn’t any help on the wiki
!c sql
core
sql [id:<ID>] [disconnect/connect:<server> (username:<username>) (password:<secret>) (ssl:true/{false})/query:<query>/update:<update>]
Interacts with a MySQL server.
This command is used to interact with a MySQL server. It can update the database or query it for information.
This commands exists primarily for interoperability with pre-existing databases and external services.
It should never be used for storing data that only Denizen needs to use. Consider instead using !command flag.
The general usage order is connect -> update/query -> disconnect.
It is not required that you disconnect right after using, and in fact encouraged that you keep a conn...
You can use sql, but generally databases are a bit of an overkill in most situations
Most situations for making plugins*
I’m just using it for a discord linking bot coded in denizen
What other solutions could there be for this?
Realy what I want to know is how to store data
!c flag
core
flag [<object>|...] [<name>([<#>])](:<action>)[:<value>] (expire:<time>)
Sets or modifies a flag on any flaggable object.
The flag command sets or modifies custom data values stored on any flaggable object (the server, a player/NPC/entity, a block location, ...).
See also !language flag system.
This command supports data actions, see !language data actions.
Flags by default are added permanently (or for the lifetime of the object they're attached to).
You can optionally specify a system time the flag will expire at, using either a DurationTag or a TimeTag.
If a DurationTag is used, it will be equivalent to: <util.time_now.add[<your_duration_here>]>
Can it be a list?
yes,there are examples in there for how to make lists in a flag
Ok
Thread moving into archive on request of @flat tinsel.
Has your issue been resolved, or your question been answered?
If so, please use the </resolved:1028673926114594866> command to close your thread.
Or </invalid:1028673926898909185> if it's not possible to resolve.
If not yet resolved, please reply below to tell us what you still need.
(Note that if there is no reply for a few days, this thread will eventually close itself.)
@flat tinsel