Coder Social home page Coder Social logo

pokemon-showdown-node-bot's Introduction

Pokemon Showdown Bot for Node (Deprecated)

This project is deprecated and no longer maintained.

This is the original bot project for the Spanish room of Pokemon Showdown, based on TalkTakesTime's bot. However it was replaced in 2016 by a rework: Showdown-ChatBot.

If you are still interested in a Pokemon Showdown Bot, you can try the following options:

This repository is being archived.


This is a Pokemon Showdown bot written in JavaScript for Node

This bot is based on commands and features, which are explained here. This is intended to ease bot configuration and customization, separating commands in multiple files, multiple features in different folders and merging functions in Global Objects like Bot, CommandParser or Settings. This bot also works in multiple languages at the same time, useful for language rooms.

Features included in this package:

  • Base: Basic commands for getting basic information, manage command permissions, languages and dynamic commands (only-text commands useful for giving information).
  • Chat-Plugins: This includes a customizable database of jokes and quotes, pokemon informational commands, smogon-related commands and others like regdate or translate (to translate pokemon stuff into different languages).
  • Moderation: Automated chat moderation for infractions like spam, flood, caps, stretching, etc This also includes a blacklist and welcome messages called join-phrases.
  • Battle: Automated battle bot for challenges, ladder and tournaments. This also includes teams management commands. Note that this is not an artificial intelligence, so it can't learn stuff and is usually easy to win it.
  • Chat Logger: Stores logs of chat rooms and/or pms. This also includes an optional logs server.
  • Tournaments: A single command for creating, starting and set auto-dq of a tournament automatically. This also includes an optional tournaments leaderboards system.
  • Games: A collection of chat games for your Pokemon Showdown Bot
  • Auto Invite: Automatically sends '/invite [room]' to room auth of a private room when they joins other room with a relation. For example if you have a secondary staff room and you want to get invited when you join lobby.
  • Youtube link recognition: If this feature is enabled in a room, when an user sends a youtube link, the bot sends a message with the title of the video.
  • Group Chats: Some tools for group chats (temporal rooms) such as automated joining and automated roomauth promotion.

Installation

Pokémon Showdown Bot requires node.js to run. Install the last stable version if you do not have it.

The first step is cloning this repo, install Git if you have not it and use the following command on shell console:

$ git clone --branch=master git://github.com/Ecuacion/Pokemon-Showdown-Node-Bot.git Pokemon-Showdown-Node-Bot

You can also download a Zip of this repo and decompress it.

Then open a shell console, use cd to reach the directory of the bot and install dependencies:

$ npm install --production

If you want to use npm test for developement, install all dependencies with npm install

To configure your bot, copy config-example.js to config.js and edit that file. You can specify bot login credentials among other things. If you don't specify credentials, the bot will log in a random username started by 'Bot'. Read the Configuration Guide for more information

Now, to start the bot use:

$ node bot

if you have an old version of Pokemon Showdown Node Bot and you want to update it, you can use:

git pull https://github.com/Ecuacion/Pokemon-Showdown-Node-Bot.git

Don't forget to use npm install --production after each update to re-install the outdated dependencies.

Configuration

Check the configuration guide for more information.

Connection Details

  • Config.server: Server url, for example main server url is sim.smogon.com
  • Config.port: Connection port, Pokemon Showdown default port is 8000
  • Config.serverid: Server id, main server id is showdown for example
  • Config.autoReconnectDelay: If connection gets closed, how much time it is waiting before reconnect
  • Config.connectionTimeout: If connection hang up, the time to check for reconnect

Crashguard

  • Config.crashguard: If true, write errors to console instead of crashing

Watchconfig

  • Config.watchconfig: If true, config.js is automatically reloaded when it is changed

Login Details

  • Config.nick: Bot Nickname, if you don't specify a nickname, it will log in a random nickname
  • Config.pass: Password, if needed
  • Config.autoReloginDelay: If it can't login because of server issues, how much time it is waiting before relogin

Rooms

  • Config.rooms: Array of rooms to join after login. You can specify a string value: all for joining all rooms, official for official rooms and public for not official rooms
  • Config.privateRooms: Specify which rooms are private
  • Config.initCmds: Array of commands to send after login

Auth Config

  • Config.exceptions: Specify rank exceptions. Use userid: true for full permissions
  • Config.ranks: Array of user groups ordered from lowest to highest auth
  • Config.globalPermissions: Global permissions that cannot be changed with set

Commands Config

  • Config.commandTokens: Array of valid command characters. A command character, for example, . means .command usage
  • Config.defaultPermission: Default permision set for this.can in commands permissions
  • Config.permissionExceptions: Exceptions for commands permissions
  • Config.botguide: Bot commands guide link
  • Config.pmhelp: Help message said when users pm the bot with no commands
  • Config.ignoreRooms: Room that will be ignored by CommandParser you you can use commands on those rooms. For example if you want to log the room without interfering with other bots commands.

Language Config

  • Config.language: Set default language

Console Config

  • Config.debug: Specify which console messages are shown

Credits

Contributors:

Part of this code is imported from other developments, so credits to:

pokemon-showdown-node-bot's People

Contributors

agustinsrg avatar bryan-0 avatar ecuacion avatar freigeist avatar irraquated avatar latios1 avatar lord-haji avatar mollete21 avatar mystifi avatar panpawn avatar spandamn avatar tr12345 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pokemon-showdown-node-bot's Issues

Updating the Bot for Newly TypeScripted Source References

(I don't think the branch of this bot is maintained anymore, but an FYI for anybody using a fork...)

Recently, this bot became unable to download and reference some source code data from Pokemon Showdown because the files such as format.js were converted to TypeScript ( smogon/pokemon-showdown@a7948c7#diff-ec96f901576fa99367c028b815c0370d ).

Thankfully, Zarel has provided an alternative method of hosting formats.js on Showdown itself ( http://play.pokemonshowdown.com/data/formats.js ), similar to how items.js, etc, are already referenced in this repository. You should be able to make use of this in a fork of this bot by making a change similar to this in your data-downloader.js:-

WeWuzNidokangz@9216150

  • You may need to restart the bot a couple of times to avoid errors after making this change, as it seems to be structured in such a way that modules can try to access downloaded data before refreshing it.

Problems with Games + Suggestion

The anagrams game accepts the same answer multiple times, even from the same user. Answering multiple time will award one point each time. Should be fixed.

Suggestion for another game: kunc. kunc is a game in which 4 moves are shown you must guess which pokemon is searched for. For an example see sparkychild's ChuChuBoTTT.

Edit: Another suggestion: Use the translation feature to provide translated names for pokeanagrams or pokehangman.

Protocol for getserver.js must be updated

When I do "node getserver.js" and enter the server I want it to connect to, it's giving an undefined error.


Configure your Pokemon Showdown Bot

Client url for server (example.psim.us): origin.psim.us
Getting data for origin.psim.us...
This may take some time, depending on Showdown's speed.

server: undefined
port: undefined
serverid: undefined

Do you want to write this in config.js? (yes, no):

Leaderboard HTML

Hello, how to have the leaderboard of tournaments in HTML?
Thank

Kunc's sets

Many of the Kunc's sets are unrecognizable,(like arceus' forms), or more pokémon has the same set, could you fix? :(

Bot's AI

Is it possible to improve bot's AI?(in the battles)

Connection Problems

Hi, I can't connect my bot to the server. It keeps saying 'disconnected from the server - retrying in 10 seconds' over and over again. Here's the link to my config file: config.js

Gen 7 support

The bot currently doesn't play competitively for Gen 7, I believe.

Using Proxy on main server.

I appreciate this bot a lot, as it has been fine with me till now but recently it's getting locked every time it connects to the server. I asked someone and got to know it's happening because it's using proxy. I mean, what should we do in this situation?
Note - This happened while using this in the main server.

I would appreciate any help by your side. Thanks.
Regards,
Champ1604.

Server advertisement moderating being false

The filter that checks if a user is advertising a PS server will fail IF: you advertise a server and then next to it in the same message put a server that's in the exceptions list.

For instance, let's say that smogtours is whitelisted.

EXAMPLE OF SOMETHING THAT WILL TRIGGER IT:

thisismynewserver.psim.us smogtours.psim.us

jointour command

It stopped working, I think due to a recent thing with a change in tournaments?

It says it can't play this tier / doesn't have a team for this tier but it worked before for those tiers.

Bot does not recognize the bot rank

When the bot is promoted to "bot" (*) this.isRanked will return false even when checking for permissions such as +, and %. This is (to my knowing) because the bot dose not recognize * as a rank yet. Are there any plans to add this? It would be useful for making commands that need to run things such as /addhtmlbox. I might take a look and try to fix this myself, but I have little experience with PS chat bots outside of writing commands for this bot.

Help

I know that this is really the wrong place to post this, but I've sent you an email and haven't gotten a reply and know no other way to contact you.

I'm using your bot on my server and I have a lot of cool and interesting suggestions for you, and I would also like to show you some stuff I've been doing with it. If you could come on my server sometime for me to show you / talk to you, that'd be really cool. (Server is Gold)

Thanks in advanced and for developing a great bot n_n

Bot not choosing pokemon for any Doubles Formats

It has come to my attention that when I challenge my bot to a Doubles Format battle (2v2 Doubles, Doubles OU, Doubles UU, and so on), whenever we get to the stage in which we choose our pokemon, the bot is unable to choose 2 pokemon (despite it can do that with Single Battles). Please fix this. If you want me to be specific about what I am saying, just ask ahead.

http://i.imgur.com/U2hYVWa.png An example of what I meant.

YouTube.

YouTube link function not working .

viewing bot

can I view the bot in my browser or can you not see him play?

New Bot Rank

The new bot rank is not recognized as auth.

symbol: *

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.