Skip to content
This repository has been archived by the owner on Feb 8, 2024. It is now read-only.
/ discord.v Public archive

Some big-little changes, like using std json mod #23

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some big-little changes, like using std json mod
also using "new" not short struct init syntax
  • Loading branch information
Terisback committed Jul 30, 2021
commit 3da6dd065a7d57ff515392f7ccedad1cc54fb2b7
12 changes: 0 additions & 12 deletions .github/FUNDING.yml

This file was deleted.

58 changes: 19 additions & 39 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,47 +1,27 @@
name: CI

on: [push, pull_request]
on:
push:
paths-ignore:
- '**.md'
pull_request:
paths-ignore:
- "**.md"

jobs:
# code-formatting:
# runs-on: ubuntu-latest
# steps:
# - name: Checkout V
# uses: actions/checkout@v2
# with:
# repository: vlang/v
# - name: Checkout VPM
# uses: actions/checkout@v2
# with:
# path: vpm
# - name: Build V
# run: make
# - name: v fmt -verify
# run: |
# cd vpm
# ../v fmt -verify vpm.v user.v token.v package.v login.v db.v

ubuntu:
runs-on: ubuntu-18.04
compile:
name: Ping-pong example
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Checkout V
- name: Checkout
uses: actions/checkout@v2
with:
repository: vlang/v
- name: Build V
run: make
- name: Checkout discord.v
uses: actions/checkout@v2
path: discordv
- name: Set up V version latest
uses: nocturlab/setup-vlang-action@v1
with:
path: terisback/discordv
- name: Install dependencies
run: sudo apt-get install --quiet -y libssl-dev
- name: Build ping-pong example
run: |
./v ./terisback/discordv/examples/ping-pong/main.v
- name: Build send-embed example
run: |
./v ./terisback/discordv/examples/send-embed/main.v
- name: Build upload-image example
run: |
./v ./terisback/discordv/examples/upload-image/main.v
v-version: latest
id: v
- name: Compile
run: v discordv/examples/ping-pong
10 changes: 4 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
main
build
discordv
/main
/build
/discordv
*.exe
*.ilk
*.pdb
*.so
*.dylib
*.dll

.vscode
*.dll
7 changes: 7 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"recommendations": [
"vlanguage.vscode-vlang",
"ms-vscode.cpptools"
],
"unwantedRecommendations": []
}
30 changes: 0 additions & 30 deletions CHANGELOG.md

This file was deleted.

4 changes: 2 additions & 2 deletions client.v
Original file line number Diff line number Diff line change
@@ -52,13 +52,13 @@ pub fn new(config Config) ?&Client {
}
client.log = m_log
for i in 0 .. config.shard_count {
mut shard := gateway.new_shard(
mut shard := gateway.new_shard(gateway.Config{
token: config.token
intents: config.intents
shard_id: i
shards_in_total: config.shard_count
dispatchers: config.dispatchers_on_shard
) ?
})
shard.log = client.log
$if dv_ws_debug ? {
shard.set_ws_log_level(.debug)
Loading