Difference between revisions of "DBEntry object"
m (1 revision imported) |
|
(No difference)
|
Latest revision as of 08:20, 1 December 2017
The DBEntry object exposes your bot's user database to you. You may want to use these, for example, to find information on users in the bot's database.
Contents
- 1 History
- 2 How to use
- 3 Properties
- 3.1 List of properties
- 3.2 EntryType property
- 3.3 Name property
- 3.4 Rank property
- 3.5 Flags property
- 3.6 IsInGroup property
- 3.7 HasFlag property
- 3.8 HasAnyFlag property
- 3.9 CreatedOn property
- 3.10 CreatedBy property
- 3.11 ModifiedOn property
- 3.12 ModifiedBy property
- 3.13 LastSeen property
- 3.14 Groups property
- 3.15 MembersOf property
- 3.16 BanMessage property
History
This object was added in StealthBot version 2.7 by Eric to create an object-oriented experience in scripting.
How to use
Example: Get the value of a property of a user.
Value = GetDBEntry("Username").Property
Properties
List of properties
- .EntryType
- .Name
- .Rank
- .Flags
- .IsInGroup(GroupName as String)
- .HasFlag(Flag as String)
- .Status(Flags as String
- .HasFlags(Flags as String)
- .CreatedOn
- .CreatedBy
- .ModifiedOn
- .ModifiedBy
- .LastSeen
- .Groups
- .MembersOf
- .BanMessage
EntryType property
This property returns the type of entry.
Name property
This property returns the entry name.
Rank property
This property returns the rank or "access".
Flags property
This property returns the flags.
IsInGroup property
This property returns the boolean of whether or not the user is part of the specified group.
HasFlag property
This property returns the boolean of whether or not the user has the specified flag.
HasAnyFlag property
This property returns the boolean of whether or not the user has any one of the specified flag(s), ie: GetDBEntry("Username").HasAnyFlag("AT")
CreatedOn property
This property returns the date the entry was created.
CreatedBy property
This property returns the user who created the entry.
ModifiedOn property
This property returns the date the entry was last modified.
ModifiedBy property
This property returns the user who last modified the entry.
LastSeen property
Currently defunct. This property returns the user's last seen date.
Groups property
This property returns the number of groups the user is a part of. Property is a collection, ie: GetDBEntry("Username").Groups.Count
MembersOf property
To be added.
BanMessage property
This property returns the ban message for the user.