Compare commits
5 Commits
37c02dea3c
...
actions
| Author | SHA1 | Date | |
|---|---|---|---|
| 352af99693 | |||
| 1290ddd9a2 | |||
|
|
835dafbd77 | ||
| 22a32841d5 | |||
| c08d3a9fab |
24
.gitea/workflows/check-flake.yaml
Normal file
24
.gitea/workflows/check-flake.yaml
Normal file
@@ -0,0 +1,24 @@
|
||||
name: Check Flake
|
||||
|
||||
on: [push]
|
||||
|
||||
env:
|
||||
DEBIAN_FRONTEND: noninteractive
|
||||
|
||||
jobs:
|
||||
check-flake:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Install sudo
|
||||
run: apt-get update && apt-get install sudo
|
||||
|
||||
- name: Install Nix
|
||||
uses: https://github.com/cachix/install-nix-action@v20
|
||||
|
||||
- name: Checkout the repository
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Check Flake
|
||||
run: nix flake check --show-trace
|
||||
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
drastikbot
|
||||
@@ -74,13 +74,13 @@ def parser():
|
||||
" already exists.")
|
||||
conf_dir = str(path.expanduser().resolve())
|
||||
else:
|
||||
path = Path('~/.drastikbot').expanduser()
|
||||
path = Path('./drastikbot').expanduser()
|
||||
if not path.is_dir():
|
||||
try:
|
||||
path.mkdir(parents=True, exist_ok=False)
|
||||
except FileExistsError:
|
||||
sys.exit("[Error] Making configuration directory at"
|
||||
" '~/.drastikbot' failed. Another file with that name"
|
||||
" './drastikbot' failed. Another file with that name"
|
||||
" already exists.")
|
||||
conf_dir = str(path)
|
||||
|
||||
|
||||
@@ -145,7 +145,7 @@ class Drastikbot():
|
||||
# statement below.
|
||||
if multipart:
|
||||
time.sleep(self.var.msg_delay)
|
||||
tr = m_len - 2 - len(' '.join(cmds).encode('utf-8')) - remainder
|
||||
tr = m_len - 2 - len(' '.join(cmds).encode('utf-8')) - remainder - 1
|
||||
t = text.encode('utf-8')[tr:]
|
||||
self.send(cmds, t)
|
||||
|
||||
|
||||
@@ -269,6 +269,7 @@ def twitter(url):
|
||||
hosts_d = {
|
||||
"youtube.com": youtube,
|
||||
"youtu.be": youtube,
|
||||
"m.youtube.com": youtube,
|
||||
"lainchan.org": lainchan,
|
||||
"i.imgur.com": imgur,
|
||||
"imgur.com": imgur,
|
||||
|
||||
Reference in New Issue
Block a user