Skip to content

Commit

Permalink
fix: Simplify @@help bot command.
Browse files Browse the repository at this point in the history
  • Loading branch information
KararTY committed Aug 13, 2020
1 parent 5096943 commit abb0dfc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
5 changes: 1 addition & 4 deletions src/Handlers/BotHandler.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { PrivmsgMessage } from 'dank-twitch-irc'
import os from 'os'
import DefaultHandler from './DefaultHandler'

export default class BotHandler extends DefaultHandler {
Expand All @@ -8,10 +7,8 @@ export default class BotHandler extends DefaultHandler {
public prefix = ['bot', 'befriendlier']

public helpText = () => {
const total = os.totalmem() / (1024 * 1024)
const heapUsed = process.memoryUsage().heapUsed / (1024 * 1024)
const rss = process.memoryUsage().rss / (1024 * 1024 * 100)
return `alloc mem: ${rss / total}, mem used: ${heapUsed / total}`
return `mem used: ~${heapUsed.toFixed(2)} mibibyte.`
}

public async onCommand (msg: PrivmsgMessage) {
Expand Down
2 changes: 1 addition & 1 deletion src/Handlers/DailyHoroscopeHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ export default class DailyHoroscopeHandler extends DefaultHandler {

private async requestHoroscope (sign: string) {
try {
const { body }: any = await fetch.get(`http://ohmanda.com/api/horoscope/${sign}/`, {
const { body }: any = await fetch.get(`https://ohmanda.com/api/horoscope/${sign}/`, {
headers: this.twitch.headers,
responseType: 'json',
})
Expand Down

0 comments on commit abb0dfc

Please sign in to comment.