GithubHelp home page GithubHelp logo

pandoa / discordfeatures Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 2.0 1.63 MB

Documentation for the Discord Features plugin available on the Unreal Engine Marketplace.

Home Page: https://www.unrealengine.com/marketplace/en-US/product/116f31feebb24938aaba6227f8617db4

discord-game-sdk unreal-engine-4 discord-gateway

discordfeatures's People

Stargazers

 avatar

Watchers

 avatar

discordfeatures's Issues

Can't send webhooks from C++

Hey,

According to the docs, I've tried to set up a webhook using the following code:

void testClass::sendWebhook()
{
	FDiscordWebhookLibrary::GetWebhook
	(
		xxxxxxxxxxxxxxxxxxxxxx,
		FDiscordGetWebhook::CreateLambda([](const FDiscordWebhook& webhook) -> void
		{
			FDiscordWebhookData msgToBeSent;
	
			msgToBeSent.Username = "testing";
			msgToBeSent.Avatar = "none";
			msgToBeSent.Content = "xyz";
	
			FDiscordWebhookLibrary::ExecuteWebhook
			(
				webhook.Id,
				webhook.Token,
				msgToBeSent,
				FDiscordExecuteWebhook::CreateLambda([](bool& bMsgSent) -> void
				{
					if(bMsgSent)
					{
						//debugMsg("We've sent the message successfully!", FColor::Yellow);
					}
					else
					{
						//debugMsg("Failed to send the message!!", FColor::Red);
					}
				})
			);
		})
	);
}

Compiler says:

  Tuple.h(299): [C2672] 'Invoke': no matching overloaded function found
  DelegateInstancesImpl.h(836): [C2672] see reference to function template instantiation 'decltype(auto) UE4Tuple_Private::TTupleBase<TIntegerSequence<uint32>>::ApplyAfter<testClass::sendWebhook::<lambda_e4f3fa8472d3c32295e9391b719b6fe3>&,bool&,const FDiscordWebhook&>(FuncType,bool &,const FDiscordWebhook &) const' being compiled
  DelegateInstancesImpl.h(834): [C2672] while compiling class template member function 'bool TBaseFunctorDelegateInstance<void (bool,const FDiscordWebhook &),UserPolicy,testClass::sendWebhook::<lambda_e4f3fa8472d3c32295e9391b719b6fe3>>::ExecuteIfSafe(bool,const FDiscordWebhook &) const'
  DelegateSignatureImpl.inl(155): [C2672] see reference to class template instantiation 'TBaseFunctorDelegateInstance<void (bool,const FDiscordWebhook &),UserPolicy,testClass::sendWebhook::<lambda_e4f3fa8472d3c32295e9391b719b6fe3>>' being compiled
  testClass.cpp(199): [C2672] see reference to function template instantiation 'TDelegate<void (bool,const FDiscordWebhook &),FDefaultDelegateUserPolicy> TDelegate<void (bool,const FDiscordWebhook &),FDefaultDelegateUserPolicy>::CreateLambda<testClass::sendWebhook::<lambda_e4f3fa8472d3c32295e9391b719b6fe3>,>(FunctorType &&)' being compiled
  testClass.cpp(167): [C2672] see reference to function template instantiation 'TDelegate<void (bool,const FDiscordWebhook &),FDefaultDelegateUserPolicy> TDelegate<void (bool,const FDiscordWebhook &),FDefaultDelegateUserPolicy>::CreateLambda<testClass::sendWebhook::<lambda_e4f3fa8472d3c32295e9391b719b6fe3>,>(FunctorType &&)' being compiled
  Tuple.h(299): [C2893] Failed to specialize function template 'unknown-type Invoke(FuncType &&,ArgTypes &&...)'
  Invoke.h(48): [C2893] see declaration of 'Invoke'
  Tuple.h(299): [C2893] With the following template arguments:
  Tuple.h(299): [C2893] 'FuncType=testClass::sendWebhook::<lambda_e4f3fa8472d3c32295e9391b719b6fe3> &'
  Tuple.h(299): [C2893] 'ArgTypes={bool &, const FDiscordWebhook &}'
  Microsoft.MakeFile.targets(45, 5): [MSB3073] The command "D:\UE_4.26\Engine\Build\BatchFiles\Build.bat projectEditor Win64 Development -Project="D:\Unreal Projects\project\project.uproject" -WaitMutex -FromMsBuild" exited with code 6.

Any ideas?

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.