Official Everybody Edits Forums

Do you think I could just leave this part blank and it'd be okay? We're just going to replace the whole thing with a header image anyway, right?

You are not logged in.

#1 2017-04-14 22:30:27, last edited by LukeM (2017-04-21 22:53:53)

LukeM
Member
From: England
Joined: 2016-06-03
Posts: 3,009
Website

[Guide] Bot tips

This is a list of a few simple things that (IMO) all bots should do, both to make them easier to use, and generally better

1. Convert all commands to lowercase
2. Dont hard-code passwords
3. Dont have a save (progress) command

I will add things to this list when / if I think of them. If you can think of any, or if you disagree with any of the above tips, then post below, and if I agree ill change this post too

Offline

Wooted by: (2)

#2 2017-04-14 22:59:04, last edited by Tomahawk (2017-04-14 22:59:54)

Tomahawk
Forum Mod
From: UK
Joined: 2015-02-18
Posts: 2,847

Re: [Guide] Bot tips

I disagree with #4, about using only ! for commands. Instead, do this:

public char[] prefixes = { '!', '.', '$' }; //etc.

...

if (prefixes.Contains(chatString[0]))
{
    ...
}

Personally I prefer using a full stop because it's the easiest to type, but it's not for us to dictate which prefix players use, so let them use any of the common ones.


One bot to rule them all, one bot to find them. One bot to bring them all... and with this cliché blind them.

Offline

Wooted by: (4)

#3 2017-04-14 23:06:16

Latif
Member
From: The Netherlands
Joined: 2015-03-13
Posts: 1,206

Re: [Guide] Bot tips

I have always done these things in my bots.

Also something else about the converting commands to lowercase: The reason why I use .ToLower() is because of usernames. Most players use the [TAB] button to complete an username in the chat. The username will also be converted to uppercase characters when you press it.

Sometimes EE changes the uppercase characters to lowercase when you send the message. And sometimes it keeps uppercase. So that's a problem for the bot.

Btw you can also just add a space after the command when you get the spam message.

Offline

Wooted by: (2)

#4 2017-04-14 23:08:40

drunkbnu
Formerly HG
Joined: 2017-08-16
Posts: 2,306

Re: [Guide] Bot tips

Or what about requiring the user to send a command via private message? No prefix required, and no spam!

Offline

Wooted by:

#5 2017-04-14 23:09:22

LukeM
Member
From: England
Joined: 2016-06-03
Posts: 3,009
Website

Re: [Guide] Bot tips

Tomahawk wrote:

I disagree with #4, about using only ! for commands.
Personally I prefer using a full stop because it's the easiest to type, but it's not for us to dictate which prefix players use, so let them use any of the common ones.

I guess youre right about it being easier to type (mostly for people who cant touchtype, as I just sort of do it unconsciously)... Maybe a \ would be the best option then? But I guess that nobody would think to use it (or might get mixed up between the slashes)...

I guess I might remove it later then, or maybe replace it with your suggestion

Offline

#6 2017-04-14 23:10:58

Tomahawk
Forum Mod
From: UK
Joined: 2015-02-18
Posts: 2,847

Re: [Guide] Bot tips

HG wrote:

Or what about requiring the user to send a command via private message? No prefix required, and no spam!

Or implement a full cleverbot where you ask the bot to do something and it'll do it.

"hey bot save the world pls ty"


One bot to rule them all, one bot to find them. One bot to bring them all... and with this cliché blind them.

Offline

Wooted by:

#7 2017-04-14 23:17:49

drunkbnu
Formerly HG
Joined: 2017-08-16
Posts: 2,306

Re: [Guide] Bot tips

Tomahawk wrote:
HG wrote:

Or what about requiring the user to send a command via private message? No prefix required, and no spam!

Or implement a full cleverbot where you ask the bot to do something and it'll do it.

"hey bot save the world pls ty"

What's wrong with private messages? You'll not only reduce chat spam, but you won't have spam restrictions when using the command. Plus, you won't need to add any prefix, just the command word.

Offline

#8 2017-04-14 23:20:14

LukeM
Member
From: England
Joined: 2016-06-03
Posts: 3,009
Website

Re: [Guide] Bot tips

HG wrote:

Or what about requiring the user to send a command via private message? No prefix required, and no spam!

This would be the best thing to do if you could pm the bot with only a few button presses, but I think that having to type /pm [bot] and having to know the bots username would be a bit annoying

Offline

#9 2017-04-14 23:24:06

drunkbnu
Formerly HG
Joined: 2017-08-16
Posts: 2,306

Re: [Guide] Bot tips

destroyer123 wrote:
HG wrote:

Or what about requiring the user to send a command via private message? No prefix required, and no spam!

This would be the best thing to do if you could pm the bot with only a few button presses, but I think that having to type /pm [bot] and having to know the bots username would be a bit annoying

Pressing Backspace lets you directly reply the latest user you PMed or that PMed you.

Offline

Wooted by:

#10 2017-04-14 23:28:47

LukeM
Member
From: England
Joined: 2016-06-03
Posts: 3,009
Website

Re: [Guide] Bot tips

HG wrote:
destroyer123 wrote

Pressing Backspace lets you directly reply the latest user you PMed or that PMed you.

I never knew that :O
So much time wasted typing pm and cycling through usernames...

It might still be a bit annoying if you are also PMing someone else though, or if you don't know about the backspace thing (like me)

Offline

#11 2017-04-15 00:16:20

den3107
Member
From: Netherlands
Joined: 2015-04-24
Posts: 1,025

Re: [Guide] Bot tips

HG wrote:

Or what about requiring the user to send a command via private message? No prefix required, and no spam!

Personally feel like it's more annoying on the user side. Generally commands aren't spammed that badly (I mean... max 30 people can be on your world, can't get that bad...).

Aside from that, what if you have a bot running, but at the same time are there in the world yourself too, pming to the bot owner would then constantly give an "unknown command" message.

Offline

den31071492211780654734

Board footer

Powered by FluxBB

[ Started around 1732395331.8619 - Generated in 0.078 seconds, 12 queries executed - Memory usage: 1.58 MiB (Peak: 1.75 MiB) ]