All Projects → Logiase → Miraigo Template

Logiase / Miraigo Template

Licence: agpl-3.0
A template for MiraiGo

Programming Languages

go
31211 projects - #10 most used programming language

Projects that are alternatives of or similar to Miraigo Template

Application
一个设计精巧, 协议实现完备的, 基于 mirai-api-http 的即时聊天软件自动化框架.
Stars: ✭ 307 (+553.19%)
Mutual labels:  qqbot, framework, qq
Go-Mirai-Client
基于MiraiGo的客户端,使用反向 websocket 收发私聊、群聊消息,消息格式类似onebot。支持多账号,很稳定
Stars: ✭ 90 (+91.49%)
Mutual labels:  qq, qqbot
XUN Bot
一个基于NoneBot和酷Q的功能性QQ机器人
Stars: ✭ 52 (+10.64%)
Mutual labels:  qq, qqbot
Miraigo
qq协议的golang实现, 移植于mirai
Stars: ✭ 404 (+759.57%)
Mutual labels:  qqbot, qq
Sisters.WudiLib
C# 与 One Bot 协议实现通信。
Stars: ✭ 33 (-29.79%)
Mutual labels:  qq, qqbot
Application
一个可自定义的,基于Graia和Mirai的集群管、功能、娱乐为一体的QQ插件式机器人
Stars: ✭ 55 (+17.02%)
Mutual labels:  qq, qqbot
Qqbot
QQBot: A conversation robot base on Tencent's SmartQQ
Stars: ✭ 3,643 (+7651.06%)
Mutual labels:  qqbot, qq
nonebot-plugin
一些 NoneBot 即开即用、良好兼容的插件——自定义表情包、早晚安、Vtuber今日运势等
Stars: ✭ 101 (+114.89%)
Mutual labels:  qq, qqbot
Noahv
An efficient front-end application framework based on vue.js
Stars: ✭ 593 (+1161.7%)
Mutual labels:  framework, template
Mirai Console
mirai 的高效率 QQ 机器人控制台
Stars: ✭ 764 (+1525.53%)
Mutual labels:  qqbot, qq
Primitive
⛏️ ‎ A front-end design toolkit for developing web apps.
Stars: ✭ 783 (+1565.96%)
Mutual labels:  framework, template
coolq-php-sdk
coolq-php-sdk
Stars: ✭ 23 (-51.06%)
Mutual labels:  qq, qqbot
Ariadne
一个优雅且完备的 Python QQ 自动化框架,基于 Mirai API HTTP v2。 Powered by Graia Project.
Stars: ✭ 234 (+397.87%)
Mutual labels:  qq, qqbot
MShell
一个Mirai机器人插件,用来连接QQ聊天窗口和系统Shell
Stars: ✭ 23 (-51.06%)
Mutual labels:  qq, qqbot
Shiro
基于OneBot协议的QQ机器人快速开发框架
Stars: ✭ 78 (+65.96%)
Mutual labels:  qq, qqbot
Gomirai
适配于Mirai HTTP API的Golang SDK
Stars: ✭ 39 (-17.02%)
Mutual labels:  qqbot, qq
WMagicBotR
基于Mirai 使用 java开发的 bot框架,在消息事件下封装了指令/权限指令 方便调用,内置公主连接/公主连结工会战功能
Stars: ✭ 40 (-14.89%)
Mutual labels:  qq, qqbot
sagiri-bot
基于Graia Ariadne和Mirai的QQ机器人 SAGIRI-BOT
Stars: ✭ 557 (+1085.11%)
Mutual labels:  qq, qqbot
Gf
GoFrame is a modular, powerful, high-performance and enterprise-class application development framework of Golang.
Stars: ✭ 6,501 (+13731.91%)
Mutual labels:  framework, template
C cpp project framework
CMake build system( framework) with kconfig support for C/CPP projects
Stars: ✭ 26 (-44.68%)
Mutual labels:  framework, template

MiraiGo-Template

A template for MiraiGo

v2 版本正在重写,请提出 你的想法你对当前设计的不满 本菜鸡会尽量改

Go Report Card

基于 MiraiGo 的多模块组合设计

包装了基础功能,同时设计了一个良好的项目结构

不了解go?

golang 极速入门

点我看书

基础配置

账号配置application.yaml

bot:
  # 账号
  account: 1234567
  # 密码
  password: example

Module 配置

module参考log.go

package mymodule

import (
    "aaa"
    "bbb"
    "MiraiGo-Template/bot"
)

var instance *Logging

func init() {
	instance = &Logging{}
	bot.RegisterModule(instance)
}

type Logging struct {
}

// ...

编写自己的Module后在app.go中启用Module

package main

import (
    // ...
    
    _ "modules/mymodule"
)

// ...

快速入门

你可以克隆本项目, 或者将本项目作为依赖.

在开始之前, 你需要首先生成设备文件.

新建文件 tools_test.go , 内容如下:

package main_test

import (
	"testing"

	"github.com/Logiase/MiraiGo-Template/bot"
)

func TestGenDevice(t *testing.T) {
	bot.GenRandomDevice()
}

然后运行 TestGenDevice 来生成一份设备文件

克隆

如果你克隆本项目, 请首先更新项目依赖, 同步到协议库最新版本, 否则可能出现某些意外的bug ( 或产生新的bug )

go get -u

MiraiGo-Template 作为go module使用

可参考当前 app.go 将其引入

使用这种方法可以引入其他小伙伴编写的第三方module

内置 Module

  • internal.logging 将收到的消息按照格式输出至 os.stdout

第三方 Module

欢迎PR

进阶内容

Docker 支持

参照 Dockerfile

引入的第三方 go module

  • MiraiGo 核心协议库
  • viper 用于解析配置文件,同时可监听配置文件的修改
  • logrus 功能丰富的Logger
  • asciiart 用于在console显示图形验证码
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].