The Python SDK for the BattleshAPI game

Overview

BattleshAPy

The Python SDK for the BattleshAPI game

Installation

This library will be eventually going on PyPI, but until then, simply clone or download this repository to use. The directory structure should look like this:

 BattleshAPy/
 main.py

Where main.py is whatever you have called your main Python script.

Basic Usage

First sign up on https://battleshapi.pythonanywhere.com/ and create a bot. From there, you can use any of the three blocks of code to get started:

Creating a Game

import BattleshAPy


class MyGame(BattleshAPy.Game):
    def on_turn_start(self):
        pass


game = BattleshAPy.BattleshAPy(
    client_id="client_id",
    client_secret="client_secret"
).create_game(MyGame)

Joining a Game

import BattleshAPy


class MyGame(BattleshAPy.Game):
    def on_turn_start(self):
        pass


game = BattleshAPy.BattleshAPy(
    client_id="client_id",
    client_secret="client_secret"
).join_game(MyGame, "game_id")

Attaching to a Game You Have Already Joined

import BattleshAPy


class MyGame(BattleshAPy.Game):
    def on_turn_start(self):
        pass


game = BattleshAPy.BattleshAPy(
    client_id="client_id",
    client_secret="client_secret"
).connect_game(MyGame, "game_id", "token")

Making Your Bot Do Something

The on_turn_start method of your bot is called whenever your bot's turn begins. When this method is finished, your turn is automatically ended

Simply add whatever code you would like to this method in order to make your bot do things!

Owner
Christopher
Christopher
Automatically mass follows tons of NameMC profiles.

Automatically mass follows tons of NameMC profiles. (Creates REAL traffic to your profile)

Jam 3 Jun 29, 2022
A telegram photos or videos background remover bot

Remove BG Bot A telegram photos or videos background remover bot Variables API_HASH Your API Hash from my.telegram.org API_ID Your API ID from my.tele

ALBY 7 Dec 13, 2022
Discord Rich Presence for Team Fortress 2

TF2 Rich Presence Discord Rich Presence for Team Fortress 2 Detects current game state, queue info, playtime, and more Configurable, reliable, and per

Kataiser 33 Dec 31, 2022
Instagram Account Creator ๐Ÿฅฐ

Instagram Account Creatorr Instagram account creator that uses requests instead of selenium! Report Bug ยท Request Feature Features Request based Conta

dropout 9 Oct 27, 2021
This is a unofficial library for making bots in rubika.

rubika this is a unofficial library for making bots in rubika using this library you can make your own0 rubika bot and control that those bots that ma

Bahman 50 Jan 02, 2023
Host your Python Discord Bot 24/7 for free. POC

๐Ÿ‰ Pandore ๐Ÿ‰ The easiest and fastest way to host your Python3 Discord Bot 24/7 for free! ๐Ÿ“š Documentation ๐Ÿ“š If you encounter any problem while using

Billy 73 Jan 02, 2023
A code to match you with the perfect Taylor Swift song for your mood and relationship status.

taylorswift A package for matching your current mood and relationship status to a suitable Taylor Swift song. Requirements: Python 2 or 3, and the num

Megan Mansfield 82 Dec 09, 2022
Discord Bot that can translate your text, count and reply to your messages with a personalised text

Discord Bot that can translate your text, count and reply to your messages with a personalised text

Grizz 2 Jan 26, 2022
Live Weather Updates using Flask and OpenWeather

AuraX Live Weather Updates using Flask and OpenWeather Installation To setup this project on your local machine, first clone this repository and insta

Ayush Gupta 3 Nov 02, 2021
Trading strategy for the Freqtrade crypto bot

NostalgiaForInfinity Trading strategy for the Freqtrade crypto bot Change strategy Add strategies to the user_data/strategies folder and also in the d

iterativ 1.5k Jan 01, 2023
Upload-Instagram - Auto Uploading Instagram Bot

###Instagram Uploading Bot### Download Python and Chrome browser pip install -r

byeonggeon sim 1 Feb 13, 2022
An API wrapper around the pythonanywhere's API.

pyaww An API wrapper around the pythonanywhere's API. The name stands for pythonanywherewrapper. 100% API coverage Most of the codebase is documented

7 Dec 11, 2022
Zen-Userbot - Userbot gabut With Python

Zen-Userbot Disclaimer โš ๏ธ PERINGATAN UNTUK ANDA โš ๏ธ ๏ธ Zen-Userbot

Wahyusaputra 6 Feb 12, 2022
This Discord bot is to give timely notifications to Students in the Lakehead CS 2021 Guild

Discord-Bot Goal of Project The purpose of this Discord bot is to give timely notifications to Students in the Lakehead CS 2021 Guild. How can I contr

8 Jan 30, 2022
Bot that embeds a random hysterical meme from Reddit into your text channel as an embedded message, using an API call.

Discord_Meme_Bot ๐Ÿคฃ Bot that embeds a random hysterical meme from Reddit into your text channel as an embedded message, using an API call. Add the bot

2 Jan 16, 2022
Python wrapper for Interactive Brokers Client Portal Web API

EasyIB: Unofficial Wrapper for Interactive Brokers API EasyIB is an unofficial python wrapper for Interactive Brokers Client Portal Web API. Features

39 Dec 13, 2022
A Python Client for News API

newsapi-python A Python client for the News API. License Provided under MIT License by Matt Lisivick. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRAN

Matt Lisivick 281 Dec 29, 2022
To send an Instagram message using Python

To send an Instagram message using Python, you must have an Instagram account and install the Instabot library in your Python virtual environment.

Coding Taggers 1 Dec 18, 2021
DonLee Robot

๐Ÿค– ๐ƒ๐Ž๐ ๐‹๐„๐„ ๐‘๐Ž๐๐Ž๐“ ๐•๐Ÿ ๐Ÿค– ๐Ÿ‘‹ Hey Muhammed, Iam DonLee RoBoT Make me an admin for your group and channel then connect me.... ๐ŸŽ‰ ๐Ÿ™‚ To build a

Muhammed 27 Dec 01, 2022
Telegram bot/scraper to get the latest NUS vacancy reports.

Telegram bot/scraper to get the latest NUS vacancy reports. Stay ahead of the curve and don't get modrekt.

Chee Hong 1 Jan 08, 2022