DBEntry object

From StealthBot Wiki Backup
Jump to: navigation, search

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.

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 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.