Code Monkey home page Code Monkey logo

discordmt's People

Contributors

archfan7411 avatar luk3yx avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

discordmt's Issues

minetest.request_http_api() returns nil, despite the mod being trusted.

This mod does not run in MT 5.6.0 and above. I got the following error.

2022-08-30 19:47:03: ERROR[Main]: ModError: Failed to load and run script from /root/programs/minetest_lss/bin/../games/minetest_game/mods/discordmt/init.lua: 2022-08-30 19:47:03: ERROR[Main]: ...t_lss/bin/../games/minetest_game/mods/discordmt/init.lua:117: attempt to index upvalue 'http' (a nil value) 2022-08-30 19:47:03: ERROR[Main]: stack traceback: 2022-08-30 19:47:03: ERROR[Main]: ...t_lss/bin/../games/minetest_game/mods/discordmt/init.lua:117: in function 'send' 2022-08-30 19:47:03: ERROR[Main]: ...t_lss/bin/../games/minetest_game/mods/discordmt/init.lua:162: in main chunk

And to answer the question, yes... minetest's .conf file has [discordmt] listed as a trusted mod for http requests

Does not work properly with the IRC mod

Issue tested and reported by Jhalman.

"IRC to in game works
Discord to in game works
IRC to discord
does not work
nor does Discord IRC"

Steps I will be taking to fix this:

  • adding irc as an optional dependency;
  • using irc.send in conjunction with old_chat_send_all when a message is sent;
  • registering a hook with irc.register_hook to receive messages, and sending them on to Discord.

Offer a way to relay without needing to run a relay server

I am running my minetest server on a hosted server since I can't host from home. There is no way to run the relay server due to the configuration of the minetest host. This mod should be made to not require a relay server because when minetest grows, there will be many servers on hosted servers and they too will not have the ability to run a relay server.

If there is no way to do this via a mod without having the core on minetest altered, push for such alterations in the core of minetest so it is possible.

Getting error when I try and run the server bot

When I try and start the relay bot I get this:

Traceback (most recent call last):
  File "server.py", line 45, in <module>
    bot = commands.Bot(command_prefix=prefix)
TypeError: __init__() missing 1 required keyword-only argument: 'intents'

Any ideas?

ERROR with LUA http

~/.minetest/mods/discordmt/init.lua:108: attempt to index upvalue 'http' (a nil value)
getting this error! What am i doing wrong???? @archfan7411

Relay timing out

randomly someone on my server will send a msg from discord and it wont go ingame not sure if its doing the same when I send a msg from ingame to Discord but here is what debug.txt is reporting

2019-11-16 16:56:48: ERROR[CurlFetch]: localhost:8080 not found (Timeout was reached) (response code 0)
2019-11-16 16:56:48: ERROR[CurlFetch]: localhost:8080 not found (Timeout was reached) (response code 0)
2019-11-16 16:56:49: ERROR[CurlFetch]: localhost:8080 not found (Timeout was reached) (response code 0)

it sends that error 3 times and then gives up and the msg will not be sent
this has happonded a number of times and at random times

server.py fails to run when system hostname is not 'localhost'

I'm on Ubuntu server lts with a unique hostname. When I ran server.py, I got the following error:

=====================================
Starting relay. Press Ctrl-C to exit.
=====================================
Traceback (most recent call last):
  File "server.py", line 216, in <module>
    loop.run_until_complete(futures)
  File "/usr/lib/python3.8/asyncio/base_events.py", line 616, in run_until_complete
    return future.result()
  File "server.py", line 206, in runServer
    await site.start()
  File "/home/minetest/.local/lib/python3.8/site-packages/aiohttp/web_runner.py", line 121, in start
    self._server = await loop.create_server(
  File "/usr/lib/python3.8/asyncio/base_events.py", line 1463, in create_server
    raise OSError(err.errno, 'error while attempting '
OSError: [Errno 99] error while attempting to bind on address ('::1', 8080, 0, 0): cannot assign requested address

I was able to work around this by changing 'localhost' to '127.0.0.1' on this line

I can make a PR if wanted, but just dropping this here for now in case anyone runs into this.

builtin messages format oddly

Player join and leave messages have some odd formatting.

BOT Server-bot: *** �(T@__builtin)�FElijah�E left the game (timed out).�E [5:20 PM] BOT Server-bot: *** �(T@__builtin)�FBoaz�E left the game (timed out).�E [5:20 PM] BOT Server-bot: *** �(T@__builtin)�Fmorgan�E left the game (timed out).�E

Chat messages and !status messages display properly. I'm not sure what the boxes [�] are suppose to be, I'm guessing some character that my font doesn't support.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.