bluearchiveBot

package module
v0.0.0-...-3d16558 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 26, 2022 License: MIT Imports: 14 Imported by: 0

README

Bluearchive Bot

What is this?

This is Packge for making my discord bot.
It helps users to access information of bluearchive from namu.wiki with commands.
It is my first project, and yet work in process, so only few functions are provided.

To use this package

You can install this package using
go get github.com/Graval504/bluearchiveBot

If it doesn't work, you can
go env -w GO111MODULE=auto

Requirement for using this package

you need python and beautifulsoup4 library because it uses python to send request.
because sending request with go causes 403 error so can't use request from net/http package.

How To Use (Example)

  • Getting Bluearchive data with jsonfile

    package main
    import (
    "github.com/Graval504/bluearchiveBot"
    )
    func main() {
    	data := bluearchiveBot.GetCharacterInfoFromData(bluearchiveBot.GetCharacterList())
    	bluearchiveBot.CreateJsonFileFromData(data)
    }
    

    It creates jsonfile.json on your directory.
    this file provides data of bluearchive that this package will using.

  • If you get error, you should visit namu.wiki website and solve captcha.

Documentation

Index

Constants

View Source
const Table = "" /* 225-byte string literal not displayed */

Variables

This section is empty.

Functions

func CreateJsonFileFromData

func CreateJsonFileFromData(data []Student)

func Discordbot

func Discordbot(token string)

Types

type Student

type Student struct {
	Name            []string
	Link            string
	School          string
	Club            string
	InitialFigures  int
	InitialStarNum  int
	AttackValue     int
	StudentType     [5]string
	AreaType        [3]string
	Weapon          string
	Equipment       [3]string
	Ooparts         [2]string
	ExUpMaterial    [4][2]int
	SkillUpMaterial [9][2]int
	Skills          struct {
		Ex      exType
		Normal  skillType
		Passive skillType
		Sub     skillType
	}
}

func GetCharacterInfoFromData

func GetCharacterInfoFromData(data []Student) []Student

func GetCharacterList

func GetCharacterList() []Student

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL